Skip to content

Commit efe7254

Browse files
committed
fix
1 parent 2886261 commit efe7254

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 2.5.3
22

33
- Fixed minor UI issues
4-
- Fixed Floating buttons making screen black with textureldr installed
4+
- Added warning when using shortcuts with textureldr installed
55

66
# 2.5.2
77

src/GUI/FloatingButton/FloatingUIManager.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ void FloatingUIManager::visit()
6060
if (!CCScene::get() || CCScene::get()->getChildByType<LoadingLayer>(0))
6161
return;
6262

63+
#ifdef GEODE_IS_MOBILE
64+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
65+
return;
66+
#endif
67+
6368
sortButtons();
6469

6570
return CCNode::visit();
@@ -87,6 +92,11 @@ bool FloatingUIManager::touches(CCSet *pTouches, CCEvent *pEvent, unsigned int u
8792
if (AndroidUI::get())
8893
return false;
8994

95+
#ifdef GEODE_IS_MOBILE
96+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
97+
return;
98+
#endif
99+
90100
sortButtons();
91101
std::reverse(buttons.begin(), buttons.end());
92102

src/GUI/FloatingButton/FloatingUIManager.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class FloatingUIDrawHook : public cocos2d::CCNode
1111

1212
class FloatingUIManager : public cocos2d::CCNode
1313
{
14+
friend struct FloatingMenuLayer;
15+
1416
protected:
1517
std::vector<FloatingUIButton*> buttons = {};
1618
FloatingUIButton* selected = nullptr;

src/GUI/FloatingButton/Hooks.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,23 @@ bool FloatingMenuLayer::init()
66
{
77
FloatingUIManager::get()->updateSprites();
88

9-
return MenuLayer::init();
9+
MenuLayer::init();
10+
11+
#ifdef GEODE_IS_MOBILE
12+
13+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
14+
{
15+
if (FloatingUIManager::get()->buttons.size() > 0)
16+
{
17+
auto alert = FLAlertLayer::create("Shortcuts", "Shortcuts are currently not supported with textureldr installed\nsorry :c", "OK");
18+
alert->m_scene = this;
19+
alert->show();
20+
}
21+
}
22+
23+
#endif
24+
25+
return true;
1026
}
1127

1228
void FloatingTouchDispatcher::touches(CCSet *pTouches, CCEvent *pEvent, unsigned int uIndex)

0 commit comments

Comments
 (0)