Skip to content

Commit

Permalink
Evil
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Sep 18, 2024
1 parent 1b1a3f1 commit d9609c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"android": "2.206",
"mac": "2.206"
},
"version": "v1.4.10",
"version": "v1.4.11",
"id": "alphalaneous.happy_textures",
"name": "Happy Textures :3",
"developer": "Alphalaneous",
Expand Down
11 changes: 6 additions & 5 deletions src/UIModding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,14 @@ void UIModding::setScaleBase(CCNode* node, matjson::Object attributes){
}

void UIModding::setDisablePages(CCNode* node, matjson::Object attributes) {
if(attributes.contains("disable-pages")){
if (attributes.contains("disable-pages")) {
matjson::Value pagesVal = attributes["disable-pages"];
if(pagesVal.is_bool()){
if (pagesVal.is_bool()) {
bool disablePages = pagesVal.as_bool();
if(disablePages){
node->setUserObject("disable-pages", CCBool::create(true));
node->boundingBox();
if (disablePages) {
if (CCMenuItem* disableItem = typeinfo_cast<CCMenuItem*>(node->getUserObject("alphalaneous.pages_api/disable"))) {
(disableItem->m_pListener->*disableItem->m_pfnSelector)(disableItem);
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
#include "nodes/CCTextInputNode.h"
#include "icons/IconHandler.h"
#include "CCDirector.h"
#include <Geode/modify/CCObject.hpp>

using namespace geode::prelude;
2 changes: 1 addition & 1 deletion src/nodes/MenuLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using namespace geode::prelude;
class $modify(MyMenuLayer, MenuLayer){

static void onModify(auto& self) {
(void) self.setHookPriority("MenuLayer::init", INT_MIN/2+1);
(void) self.setHookPriority("MenuLayer::init", INT_MIN/2-1);
}

bool init(){
Expand Down

0 comments on commit d9609c8

Please sign in to comment.