Skip to content

Commit

Permalink
last thing
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMario211 committed Jan 20, 2024
1 parent 77144b6 commit a34c257
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ tmp/

# other things
build-android/
build-android-old/
build-androidold.sh
build-linux-deb/
svgs/
compile_commands.json
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# v1.0.2
- Fixed bug with the game crashing if you are on a platformer level, and you press pause a couple of times.
# v1.0.1
- Disabled Layout Mode on Android (for now)
- Fixed issue with LevelInfoLayer crashing if its your own level and you have Copy Hack enabled.
Expand Down
31 changes: 29 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class $modify(MyCustomMenu, MenuLayer) {
case 5: // Settings
jsonArray = matjson::parse(Hacks::getSettings()).as_array();
ImGui::Text("%s", Lang::get(currentLang)->name("Prism Menu by Firee").c_str());
ImGui::Text("V1.0.0 (Geode)");
ImGui::Text("V1.0.2 (Geode)");
ImGui::Separator();
break;
}
Expand Down Expand Up @@ -639,11 +639,38 @@ pCVar2 = (CCActionInterval *)cocos2d::CCActionTween::create((float)uVar8,(char *
}
};

// theres no including Geode Util class funcs so, https://github.com/geode-sdk/DevTools
std::string getNodeName(cocos2d::CCObject* node) {
#ifdef GEODE_IS_WINDOWS
return typeid(*node).name() + 6;
#else
{
std::string ret;

int status = 0;
auto demangle = abi::__cxa_demangle(typeid(*node).name(), 0, 0, &status);
if (status == 0) {
ret = demangle;
}
free(demangle);

return ret;
}
#endif
}

// showing the icon for android users lol
class $modify(PauseLayer) {
void customSetup() {
PauseLayer::customSetup();
auto menu = dynamic_cast<CCMenu*>(this->getChildren()->objectAtIndex(8));
CCMenu* menu;
for (int i = 0; i < this->getChildrenCount(); i++) {
auto child = this->getChildren()->objectAtIndex(i);
if (getNodeName(child) == "cocos2d::CCMenu") {
menu = static_cast<CCMenu*>(child);
break;
}
}
if (menu == nullptr) return;
auto button = PrismButton::createButton(this);
button->setPositionX(-240);
Expand Down

0 comments on commit a34c257

Please sign in to comment.