From 25e336ce1da3a120b79a6b16efe341405f0dbe8a Mon Sep 17 00:00:00 2001 From: Alphalaneous <38200084+Alphalaneous@users.noreply.github.com> Date: Wed, 22 May 2024 04:40:14 -0400 Subject: [PATCH] allow modifications again --- src/UIModding.cpp | 3 +-- src/nodes/CCScene.h | 4 ++-- src/nodes/MenuLayer.h | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/UIModding.cpp b/src/UIModding.cpp index 7d148be..6a5d1cd 100644 --- a/src/UIModding.cpp +++ b/src/UIModding.cpp @@ -14,8 +14,7 @@ using namespace geode::prelude; UIModding* UIModding::instance = nullptr; $execute { - //UIModding::get()->doModify = Mod::get()->getSettingValue("ui-modifications"); - UIModding::get()->doModify = false; + UIModding::get()->doModify = Mod::get()->getSettingValue("ui-modifications"); } void UIModding::updateColors(CCNode* node, std::string name){ diff --git a/src/nodes/CCScene.h b/src/nodes/CCScene.h index 94de1ba..a134d8e 100644 --- a/src/nodes/CCScene.h +++ b/src/nodes/CCScene.h @@ -23,7 +23,7 @@ class $modify(MyCCScene, CCScene){ static CCScene* create(){ auto ret = CCScene::create(); if(UIModding::get()->doModify){ - //ret->schedule(schedule_selector(MyCCScene::checkForUpdates)); + ret->schedule(schedule_selector(MyCCScene::checkForUpdates)); } return ret; } @@ -36,7 +36,7 @@ class $modify(MyCCScene, CCScene){ idx++; if(node->getID() == "MenuLayer") continue; if(idx > m_fields->m_currentCount){ - //UIModding::get()->doUICheck(node); + UIModding::get()->doUICheck(node); } } } diff --git a/src/nodes/MenuLayer.h b/src/nodes/MenuLayer.h index 39d201e..ea08bac 100644 --- a/src/nodes/MenuLayer.h +++ b/src/nodes/MenuLayer.h @@ -19,11 +19,11 @@ class $modify(MyMenuLayer, MenuLayer){ if(!MenuLayer::init()){ return false; } - //UIModding::get()->doModify = Mod::get()->getSettingValue("ui-modifications"); + UIModding::get()->doModify = Mod::get()->getSettingValue("ui-modifications"); if(UIModding::get()->doModify){ - //UIModding::get()->startFileListeners(); - //UIModding::get()->doUICheck(this); + UIModding::get()->startFileListeners(); + UIModding::get()->doUICheck(this); } return true; }