Skip to content

Commit 40d7305

Browse files
committed
fix bug :)
1 parent f6eda5c commit 40d7305

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ else()
88
endif()
99
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
1010

11-
project(DeltaruneTextboxes VERSION 1.4.4)
11+
project(DeltaruneTextboxes VERSION 1.4.5)
1212

1313
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS OR (ANDROID AND ANDROID_ABI STREQUAL "armeabi-v7a"))
1414
add_compile_definitions(DISABLE_KEYBOARD)

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.4.5
2+
- Fixed a bug where buttons can't be pressed after handleTouchPrio
3+
14
### v1.4.4
25
- Bumped to Geode 4.4.0
36
- Removed controller glyphs

mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.4.0",
2+
"geode": "4.5.0",
33
"gd": {
44
"win": "2.2074",
55
"android": "2.2074",
@@ -8,7 +8,7 @@
88
},
99
"id": "timestepyt.deltarune_textboxes",
1010
"name": "Deltarune Textboxes",
11-
"version": "v1.4.4",
11+
"version": "v1.4.5",
1212
"developer": "TimeStepYT",
1313
"description": "Makes Popups look like Deltarune",
1414
"links": {

src/FLAlertLayer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ void DeltaruneAlertLayer::clickedOnButton(CCMenuItemSpriteExtra* btn, ButtonSpri
218218
else label->setColor(ccColor3B{ 255,255,255 });
219219
}
220220
bool DeltaruneAlertLayer::ccTouchBegan(CCTouch* touch, CCEvent* event) {
221-
if (m_fields->incompatible) return FLAlertLayer::ccTouchBegan(touch, event);
221+
if (m_fields->incompatible) {
222+
return FLAlertLayer::ccTouchBegan(touch, event); }
222223

223224
if (!m_fields->done && !m_fields->disableClickToProgress) {
224225
if (m_fields->rolledPage)

src/PurchaseItemPopup.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ bool DeltarunePurchaseItemPopup::init(GJStoreItem* p0) {
5858
title,
5959
content,
6060
button1String, button2String,
61-
[this](auto, bool btn2) {
61+
[self = Ref(this)] (auto, bool btn2) {
6262
if (btn2) {
63-
onBuy();
63+
self->onBuy();
6464
return;
6565
}
66-
onCancel();
66+
self->onCancel();
6767
}
6868
);
6969

src/changeDesign.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void DeltaruneAlertLayer::changeSingleButton(CCMenuItemSpriteExtra* btn, ButtonS
8686
auto label = buttonSprite->getChildByType<CCLabelBMFont>(0);
8787
if (label) {
8888
label->setFntFile("Determination.fnt"_spr);
89-
label->setScale(1);
89+
label->setScale(1.f);
9090
}
9191
}
9292

@@ -113,6 +113,19 @@ void DeltaruneAlertLayer::changeButtons() {
113113

114114
changeSingleButton(m_fields->btn1, m_button1);
115115
changeSingleButton(m_fields->btn2, m_button2);
116+
117+
Loader::get()->queueInMainThread([self = Ref(this)] {
118+
Loader::get()->queueInMainThread([self] {
119+
auto& buttonMenu = self->m_buttonMenu;
120+
121+
int parentTouchPrio = self->getTouchPriority();
122+
int menuTouchPrio = buttonMenu->getTouchPriority();
123+
124+
if (parentTouchPrio >= menuTouchPrio) {
125+
buttonMenu->setTouchPriority(parentTouchPrio + 1);
126+
}
127+
});
128+
});
116129
}
117130

118131
void DeltaruneAlertLayer::changeTitle() {

0 commit comments

Comments
 (0)