Skip to content

Commit 6f412c9

Browse files
committed
suggested feature
1 parent e982dee commit 6f412c9

File tree

4 files changed

+51
-4
lines changed

4 files changed

+51
-4
lines changed

about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ This mod hides the buttons <cr>nobody</c> uses!
44

55
By <cb>default</c>, it hides the <cy>Newgrounds</c> button, the <cy>More Games</c> button and the <cy>social media</c> buttons in the <cg>main menu</c>!
66

7-
<cg>Optionally</c>, you can also disable the <co>RobTop</c> logo!
7+
<cg>Optionally</c>, you can also disable the <co>RobTop</c> logo and the grayed out buttons in CreatorLayer!
88

99
Configurable so you can reenable the buttons you want!

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog for NoStupidButtons
22

3+
## v1.2.0
4+
- Grayed out buttons in CreatorLayer are now able to be hidden!
5+
36
## v1.1.5
47
- iOS support <3
58

mod.json

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.3.1",
2+
"geode": "4.4.0",
33
"gd": {
44
"win": "2.2074",
55
"android": "2.2074",
@@ -11,11 +11,16 @@
1111
},
1212
"id": "timestepyt.nostupidbuttons",
1313
"name": "NoStupidButtons",
14-
"version": "v1.1.5",
14+
"version": "v1.2.0",
1515
"developer": "TimeStepYT",
1616
"description": "This mod hides the buttons nobody uses!",
1717

1818
"settings": {
19+
"menulayer-title": {
20+
"type": "title",
21+
"name": "MenuLayer",
22+
"description": "Everything that can be adjusted in MenuLayer"
23+
},
1924
"hide-newgrounds-button": {
2025
"name": "Hide Newgrounds Button",
2126
"description": "Toggles if the Newgrounds Button should be hidden in the Main Menu",
@@ -39,6 +44,23 @@
3944
"description": "Toggles if the RobTop logo should be hidden in the Main Menu",
4045
"type": "bool",
4146
"default": false
42-
}
47+
},
48+
"creatorlayer-title": {
49+
"type": "title",
50+
"name": "CreatorLayer",
51+
"description": "Everything that can be adjusted in CreatorLayer"
52+
},
53+
"hide-map-button": {
54+
"type": "bool",
55+
"name": "Hide Map Button",
56+
"description": "Toggles if the Map button should be removed from CreatorLayer",
57+
"default": false
58+
},
59+
"hide-versus-button": {
60+
"type": "bool",
61+
"name": "Hide Versus Button",
62+
"description": "Toggles if the Versus button should be removed from CreatorLayer",
63+
"default": false
64+
}
4365
}
4466
}

src/main.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using namespace geode::prelude;
44

55
#include <Geode/modify/MenuLayer.hpp>
6+
#include <Geode/modify/CreatorLayer.hpp>
67

78
bool isSettingEnabled(std::string setting) {
89
return Mod::get()->getSettingValue<bool>(setting);
@@ -55,3 +56,24 @@ class $modify(MyMenuLayer, MenuLayer) {
5556
return true;
5657
}
5758
};
59+
60+
61+
class $modify(MyCreatorLayer, CreatorLayer) {
62+
bool init() {
63+
if (!CreatorLayer::init()) return false;
64+
65+
auto creatorButtonsMenu = this->getChildByID("creator-buttons-menu");
66+
67+
if (!creatorButtonsMenu) return true;
68+
69+
auto versusButton = creatorButtonsMenu->getChildByID("versus-button");
70+
auto mapButton = creatorButtonsMenu->getChildByID("map-button");
71+
72+
if (isSettingEnabled("hide-versus-button"))
73+
versusButton->removeMeAndCleanup();
74+
if (isSettingEnabled("hide-map-button"))
75+
mapButton->removeMeAndCleanup();
76+
creatorButtonsMenu->updateLayout();
77+
return true;
78+
}
79+
};

0 commit comments

Comments
 (0)