-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix CCLabelBMFont color setting - Fix compatibility with Gradient Pages and Custom Profiles - Fix flicker on cells - Fix LeaderboardsLayer and LevelBrowserLayer colors on refresh - Use geode string utils
- Loading branch information
1 parent
e50d2bc
commit b6fb87e
Showing
26 changed files
with
694 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#pragma once | ||
|
||
#include <Geode/Geode.hpp> | ||
#include <Geode/modify/CCDirector.hpp> | ||
#include <Geode/modify/LeaderboardsLayer.hpp> | ||
#include <Geode/modify/LevelBrowserLayer.hpp> | ||
#include "UIModding.h" | ||
|
||
using namespace geode::prelude; | ||
|
||
void setBackground(CCNode* node) { | ||
if (UIModding::get()->doModify) { | ||
if (CCSprite* bg = typeinfo_cast<CCSprite*>(node->getChildByIDRecursive("background"))) { | ||
if (bg->getColor() == ccColor3B{0, 102, 255}) { | ||
std::optional<ColorData> dataOpt = UIModding::get()->getColors("background"); | ||
if (dataOpt.has_value()) { | ||
ColorData data = dataOpt.value(); | ||
bg->setColor(data.color); | ||
bg->setOpacity(data.alpha); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
class $modify(CCDirector) { | ||
|
||
static void onModify(auto& self) { | ||
(void) self.setHookPriority("CCDirector::willSwitchToScene", INT_MIN); | ||
} | ||
|
||
void willSwitchToScene(CCScene* scene) { | ||
setBackground(scene); | ||
CCDirector::willSwitchToScene(scene); | ||
} | ||
}; | ||
|
||
class $modify(LeaderboardsLayer) { | ||
|
||
bool init(LeaderboardState p0) { | ||
if (!LeaderboardsLayer::init(p0)) return false; | ||
setBackground(this); | ||
return true; | ||
} | ||
}; | ||
|
||
class $modify(LevelBrowserLayer) { | ||
|
||
bool init(GJSearchObject* p0) { | ||
if (!LevelBrowserLayer::init(p0)) return false; | ||
setBackground(this); | ||
return true; | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.