File tree Expand file tree Collapse file tree 5 files changed +65
-29
lines changed
Expand file tree Collapse file tree 5 files changed +65
-29
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,9 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
66
77project (Geodify VERSION 1.0.0)
88
9- add_library (${PROJECT_NAME} SHARED
10- src/modify/GJGarageLayer.cpp
11- src/modify/LevelSearchLayer.cpp
12- src/modify/CreatorLayer.cpp
13- src/modify/LevelSelectLayer.cpp
14- src/modify/LevelBrowserLayer.cpp
15- src/modify/LeaderboardsLayer.cpp
16- src/SwelvyBG.cpp
17- )
9+ file (GLOB_RECURSE SOURCES src/*.cpp)
10+
11+ add_library (${PROJECT_NAME} SHARED ${SOURCES} )
1812
1913if (NOT DEFINED ENV{GEODE_SDK})
2014 message (FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode" )
Original file line number Diff line number Diff line change 11# Geodify
2- This is where she makes a mod.
2+ A mod made to to change most menus' backgrounds to the Geode one
33
4- <img src =" logo.png " width =" 150 " alt =" the mod's logo " />
4+ <img src =" logo.png " width =" 150 " alt =" Logo " />
55
6- * Update logo.png to change your mod's icon (please)*
7-
8- ## Getting started
9- We recommend heading over to [ the getting started section on our docs] ( https://docs.geode-sdk.org/getting-started/ ) for useful info on what to do next.
10-
11- ## Build instructions
12- For more info, see [ our docs] ( https://docs.geode-sdk.org/getting-started/create-mod#build )
13- ``` sh
14- # Assuming you have the CLI set up already
15- geode build
16- ```
17-
18- # Resources
19- * [ Geode SDK Documentation] ( https://docs.geode-sdk.org/ )
20- * [ Geode SDK Source Code] ( https://github.com/geode-sdk/geode/ )
21- * [ Bindings] ( https://github.com/geode-sdk/bindings/ )
22- * [ Dev Tools] ( https://github.com/geode-sdk/DevTools )
Original file line number Diff line number Diff line change 77 "version" : " v1.0.0-beta.1" ,
88 "id" : " omgrod.geodify" ,
99 "name" : " Geodify" ,
10- "developer " : " OmgRod" ,
10+ "developers " : [ " OmgRod" , " Viper " ] ,
1111 "description" : " Converts most menus' backgrounds to the Geode one (SwelvyBG)." ,
12+ "early-load" : true ,
1213 "resources" : {
1314 "sprites" : [" res/*.png" ]
1415 },
Original file line number Diff line number Diff line change 1+ #include " ../SwelvyBG.hpp"
2+ #include < Geode/Geode.hpp>
3+ #include < Geode/modify/LoadingLayer.hpp>
4+
5+ using namespace geode ::prelude;
6+ class $modify(LoadingLayer) {
7+ static void onModify (auto & self) {
8+ (void ) self.setHookPriority (" LoadingLayer::init" , -2 ); // For SwelvyBGInsert Aka BetterMenu no overlap
9+ }
10+ bool init (bool p0) {
11+ if (!LoadingLayer::init (p0))
12+ return false ;
13+
14+ if (this ->getChildByID (" SwelvyBG" )) {
15+ return true ;
16+ }
17+
18+ SwelvyBG* swelvyBG = SwelvyBG::create ();
19+ swelvyBG->setZOrder (-3 );
20+ swelvyBG->setID (" swelvy-background" );
21+
22+ if (CCNode* bg = this ->getChildByIDRecursive (" bg-texture" )) {
23+ bg->setVisible (false );
24+ }
25+ return true ;
26+ }
27+ };
Original file line number Diff line number Diff line change 1+ #include " ../SwelvyBG.hpp"
2+ #include < Geode/Geode.hpp>
3+ #include < Geode/modify/MenuLayer.hpp>
4+
5+ using namespace geode ::prelude;
6+
7+ class $modify(MenuLayer) {
8+ static void onModify (auto & self) {
9+ (void )self.setHookPriority (" MenuLayer::init" , -2 ); // For SwelvyBGInsert Aka BetterMenu no overlap
10+ }
11+ bool init () {
12+ if (!MenuLayer::init ()) {
13+ return false ;
14+ }
15+
16+ if (this ->getChildByID (" SwelvyBG" )) {
17+ return true ;
18+ }
19+
20+ if (CCNode* mainmenu = this ->getChildByIDRecursive (" main-menu-bg" )) {
21+ mainmenu->setVisible (false );
22+ }
23+ SwelvyBG* swelvyBG = SwelvyBG::create ();
24+ swelvyBG->setZOrder (-3 );
25+ swelvyBG->setID (" swelvy-background" );
26+
27+ this ->addChild (swelvyBG);
28+
29+ return true ;
30+ }
31+ };
You can’t perform that action at this time.
0 commit comments