Skip to content

Commit 1824bc9

Browse files
committed
IF THIS DOESNT WORK IM GONNA CRY
1 parent 2c44311 commit 1824bc9

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

src/GUI/FloatingButton/FloatingUIButton.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ void FloatingUIButton::updateSprites()
7979
{
8080
this->removeAllChildren();
8181

82+
#ifdef GEODE_IS_MOBILE
83+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
84+
return;
85+
#endif
86+
8287
if (!background.empty())
8388
{
8489
CCSprite* bg = nullptr;
@@ -116,6 +121,11 @@ void FloatingUIButton::updateSprites()
116121

117122
void FloatingUIButton::update(float dt)
118123
{
124+
#ifdef GEODE_IS_MOBILE
125+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
126+
return;
127+
#endif
128+
119129
auto v = visibilityConf.shouldShow();
120130

121131
this->setVisible(v);

src/GUI/FloatingButton/FloatingUIManager.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ FloatingUIManager* FloatingUIManager::get()
1111
if (!instance)
1212
{
1313
instance = new FloatingUIManager();
14+
#ifdef GEODE_IS_MOBILE
15+
if (!Loader::get()->getLoadedMod("geode.texture-loader"))
16+
CCDirector::get()->m_pNotificationNode = new FloatingUIDrawHook();
17+
18+
#else
19+
1420
CCDirector::get()->m_pNotificationNode = new FloatingUIDrawHook();
21+
22+
#endif
1523
}
1624

1725
return instance;
@@ -20,6 +28,12 @@ FloatingUIManager* FloatingUIManager::get()
2028
void FloatingUIManager::addButton(FloatingUIButton* btn)
2129
{
2230
buttons.push_back(btn);
31+
32+
#ifdef GEODE_IS_MOBILE
33+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
34+
return;
35+
#endif
36+
2337
this->addChild(btn);
2438
}
2539

@@ -29,11 +43,22 @@ void FloatingUIManager::removeButton(FloatingUIButton* btn)
2943
return;
3044

3145
buttons.erase(std::remove(buttons.begin(), buttons.end(), btn), buttons.end());
46+
47+
#ifdef GEODE_IS_MOBILE
48+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
49+
return;
50+
#endif
51+
3252
this->removeChild(btn);
3353
}
3454

3555
void FloatingUIManager::updateSprites()
3656
{
57+
#ifdef GEODE_IS_MOBILE
58+
if (Loader::get()->getLoadedMod("geode.texture-loader"))
59+
return;
60+
#endif
61+
3762
for (auto btn : buttons)
3863
{
3964
btn->updateSprites();

src/GUI/FloatingButton/Hooks.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@ bool FloatingMenuLayer::init()
2727

2828
void FloatingTouchDispatcher::touches(CCSet *pTouches, CCEvent *pEvent, unsigned int uIndex)
2929
{
30+
#ifdef GEODE_IS_MOBILE
31+
if (!Loader::get()->getLoadedMod("geode.texture-loader"))
32+
{
33+
if (FloatingUIManager::get()->touches(pTouches, pEvent, uIndex))
34+
return;
35+
}
36+
#else
3037
if (FloatingUIManager::get()->touches(pTouches, pEvent, uIndex))
3138
return;
39+
#endif
3240

3341
CCTouchDispatcher::touches(pTouches, pEvent, uIndex);
3442
}

0 commit comments

Comments
 (0)