diff --git a/changelog.md b/changelog.md index 502398d..8f77db9 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,5 @@ +# v1.4.1 + - Fixed Mac OS issue with not being able to open menu. # v1.4.0 - Added Dear ImGui back (from request) - Fixed Accurate Percentage on levels with the End Level Trigger (Thanks dankmeme01!) diff --git a/mod.json b/mod.json index c03d119..b4f1d09 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "geode": "2.0.0", - "version": "v1.4.0", + "version": "v1.4.1", "gd": { "win": "2.204", "mac": "2.200", diff --git a/resources/hacks/settings.json b/resources/hacks/settings.json index 170e888..0b998b6 100644 --- a/resources/hacks/settings.json +++ b/resources/hacks/settings.json @@ -103,7 +103,7 @@ "default": "button" }, { - "name": "Menu Style", + "name": "Menu-Style", "desc": "", "opcodes": [], "type": "dropdown", diff --git a/src/ImGui.cpp b/src/ImGui.cpp index 61184cf..b5447f5 100644 --- a/src/ImGui.cpp +++ b/src/ImGui.cpp @@ -230,7 +230,7 @@ class $modify(MenuLayer) { } else if (name == "Button Position Y") { Hacks::Settings::setSettingValue(&settings, *hack, hack->value.intValue); if (prismButton != nullptr) prismButton->setPositionY(hack->value.intValue); - } else if (name == "Menu Style") { + } else if (name == "Menu-Style") { Hacks::Settings::setSettingValue(&settings, *hack, hack->value.intValue); static_cast(prismButton)->showImGuiMenu = false; } else { @@ -390,7 +390,7 @@ class $modify(MenuLayer) { if (ImGui::Selectable(values[i].as_string().c_str(), isSelected)) { hack->value.intValue = i; Hacks::Settings::setSettingValue(&settings, *hack, hack->value.intValue); - if (name == "Menu Style") { + if (name == "Menu-Style") { prismButton->showImGuiMenu = !prismButton->showImGuiMenu; } } diff --git a/src/PrismButton.hpp b/src/PrismButton.hpp index a1dc529..a7f22ef 100644 --- a/src/PrismButton.hpp +++ b/src/PrismButton.hpp @@ -113,7 +113,10 @@ class PrismButton : public CCMenu { return CCMenuItemSpriteExtra::create(myButtonSpr, ret, menu_selector(PrismButton::onButtonClicked)); } void onButtonClicked(CCObject* p0) { - HackItem* menuStyle = Hacks::getHack("Menu Style"); + HackItem* menuStyle = Hacks::getHack("Menu-Style"); + #ifdef GEODE_IS_MACOS + menuStyle->value.intValue = 1; + #endif if (menuStyle->value.intValue == 0) { // imgui showImGuiMenu = !showImGuiMenu; } else { diff --git a/src/PrismUI.cpp b/src/PrismUI.cpp index 98252d6..22c21d6 100644 --- a/src/PrismUI.cpp +++ b/src/PrismUI.cpp @@ -384,7 +384,7 @@ void PrismUIButton::onDropdownBtn(CCObject* sender) { auto settings = Mod::get()->getSavedValue("values"); hack->value.intValue = index; Hacks::Settings::setSettingValue(&settings, *hack, hack->value.intValue); - if (hack->name == "Menu Style") { + if (hack->name == "Menu-Style") { auto obj = static_cast(CCScene::get()->getChildByID("prism-menu")); obj->onClose(sender); } else if (hack->name == "Theme") { diff --git a/src/hacks.hpp b/src/hacks.hpp index 64481e3..5cfd936 100644 --- a/src/hacks.hpp +++ b/src/hacks.hpp @@ -195,15 +195,7 @@ class Hacks { value = Hacks::Settings::getSettingValue(settings, name).as_int(); settingExists = true; } else { - if (name == "Menu Style") { - #ifdef GEODE_IS_ANDROID - value = HackValue(1); - #else - value = HackValue(0); - #endif - } else { - value = HackValue(obj.get("default")); - } + value = HackValue(obj.get("default")); } } else if (type == "float") { if (Hacks::Settings::settingContainsHack(settings, name) && !reset) { diff --git a/src/main.cpp b/src/main.cpp index fcacb06..7c43af4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,9 +98,9 @@ class $modify(CCKeyboardDispatcher) { bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool arr) { if (down && (key == KEY_Tab)) { auto prismButton = typeinfo_cast(CCScene::get()->getChildByID("prism-icon")); - if (prismButton == nullptr) return true; - HackItem* menuStyle = Hacks::getHack("Menu Style"); + HackItem* menuStyle = Hacks::getHack("Menu-Style"); #ifdef GEODE_IS_MACOS + if (prismButton == nullptr) return true; menuStyle->value.intValue = 1; #endif if (menuStyle->value.intValue == 0) { // imgui