Skip to content

Commit 85c0d27

Browse files
committed
added macos custom keybinds support (please work)
1 parent e7f25fd commit 85c0d27

File tree

9 files changed

+30
-23
lines changed

9 files changed

+30
-23
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
55
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
66

7-
project(DeltaruneTextboxes VERSION 1.2.9)
7+
project(DeltaruneTextboxes VERSION 1.3.0)
88

99
add_library(${PROJECT_NAME} SHARED
1010
src/FLAlertLayer.cpp

about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ If you're <c>able</c> to use the <cj>Custom Keybinds</c> mod, then you can <cj>r
1313
If you want to suggest a feature, create an issue on github or ping me on discord (@timestepyt)
1414

1515
# Special Thanks
16-
<cr>prevter</c>: Answered my stupid questions, and helped a lot!
16+
<cr>prevter</c>: Answered my stupid questions and helped alot!
1717

1818
JohnnyEnglish1: Reported a bug where choices don't appear, which never happened to me.

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.3.0
2+
- Added Custom Keybinds support to MacOS!
3+
14
### v1.2.9
25
- Fixed the crash that was born due to the fix
36

mod.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.0.1",
2+
"geode": "4.2.0",
33
"gd": {
44
"win": "2.2074",
55
"android": "2.2074",
@@ -8,26 +8,27 @@
88
},
99
"id": "timestepyt.deltarune_textboxes",
1010
"name": "Deltarune Textboxes",
11-
"version": "v1.2.9",
11+
"version": "v1.3.0",
1212
"developer": "TimeStepYT",
1313
"description": "Makes Popups look like Deltarune",
1414
"links": {
1515
"source": "https://github.com/TimeStepYT/DeltaruneTextboxes"
1616
},
17-
"tags": ["customization"],
18-
"dependencies": [
19-
{
20-
"id": "geode.node-ids",
17+
"tags": [
18+
"customization"
19+
],
20+
"dependencies": {
21+
"geode.node-ids": ">=1.19.0",
22+
"geode.custom-keybinds": {
2123
"importance": "required",
22-
"version": ">=1.10.0"
23-
},
24-
{
25-
"id": "geode.custom-keybinds",
2624
"version": ">=v1.7.1",
27-
"platforms": ["win", "android64"],
28-
"importance": "required"
25+
"platforms": [
26+
"win",
27+
"macos",
28+
"android64"
29+
]
2930
}
30-
],
31+
},
3132
"resources": {
3233
"sprites": [
3334
"resources/undertaleSquare.png",
@@ -99,7 +100,10 @@
99100
"type": "bool",
100101
"default": false,
101102
"description": "Disables <cy>clicking</c> to progress textboxes",
102-
"platforms": ["win", "mac"]
103+
"platforms": [
104+
"win",
105+
"mac"
106+
]
103107
},
104108
"coloredPortraits": {
105109
"name": "Colored Portraits",
@@ -171,4 +175,4 @@
171175
]
172176
}
173177
}
174-
}
178+
}

src/CCKeyboardDispatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "include.h"
22

3-
#if !(defined(GEODE_IS_MACOS) || defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
3+
#if !(defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
44
$execute{
55
keybinds::BindManager::get()->registerBindable(
66
{

src/FLAlertLayer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ bool DeltaruneAlertLayer::init(FLAlertLayerProtocol* delegate, char const* title
7777
textArea = m_mainLayer->getChildByID("content-text-area");
7878
bg = m_mainLayer->getChildByID("background");
7979
titleNode = static_cast<CCLabelBMFont*>(m_mainLayer->getChildByID("title"));
80-
#if !(defined(GEODE_IS_MACOS) || defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
80+
#if !(defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
8181
initCustomKeybinds();
8282
#endif
8383
Loader::get()->queueInMainThread([bg, titleNode, textArea, this] {
@@ -249,7 +249,7 @@ bool DeltaruneAlertLayer::ccTouchBegan(CCTouch* touch, CCEvent* event) {
249249
clickedOnButton(btn2, m_button2, 2);
250250
return ret;
251251
}
252-
#if (defined(GEODE_IS_MACOS) || defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
252+
#if (defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
253253
void DeltaruneAlertLayer::keyDown(enumKeyCodes key) {
254254
if (m_fields->incompatible) {
255255
FLAlertLayer::keyDown(key);

src/FLAlertLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class $modify(DeltaruneAlertLayer, FLAlertLayer) {
7070
void clickedOnButton(CCMenuItemSpriteExtra*, ButtonSprite*, int);
7171
bool ccTouchBegan(CCTouch*, CCEvent*) override;
7272

73-
#if (defined(GEODE_IS_MACOS) || defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
73+
#if (defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
7474
void keyDown(enumKeyCodes) override;
7575
#else
7676
void initCustomKeybinds();

src/changeDesign.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void DeltaruneAlertLayer::changeButtons() {
111111
}
112112

113113
void DeltaruneAlertLayer::changeTitle() {
114-
CCLabelBMFont*& title = m_fields->title;
114+
CCLabelBMFont* &title = m_fields->title;
115115
auto& bg = m_fields->bg;
116116
title->setAnchorPoint(CCPoint{ 0, 0 });
117117
title->setFntFile("Determination.fnt"_spr);

src/include.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <Geode/Geode.hpp>
22

33
#include <Geode/fmod/fmod.hpp>
4-
#if !(defined(GEODE_IS_MACOS) || defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
4+
#if !(defined(DEBUG_MAC_INPUTS) || defined(GEODE_IS_ANDROID32))
55
#include <geode.custom-keybinds/include/Keybinds.hpp>
66
#endif
77
#include <Geode/modify/FLAlertLayer.hpp>

0 commit comments

Comments
 (0)