Skip to content

Commit ba273d2

Browse files
committed
oh im an idiot
1 parent e8cc09a commit ba273d2

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

mod.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.4.0",
2+
"geode": "4.7.0",
33
"gd": {
44
"win": "2.2074",
55
"mac": "2.2074",
@@ -187,6 +187,14 @@
187187
"type": "bool",
188188
"default": false
189189
},
190+
"backdropOpacity": {
191+
"name": "Backdrop Opacity",
192+
"description": "Adjust the opacity of the backdrop of EndLevelLayer. Set to 100 (the vanilla default) to disable.",
193+
"type": "int",
194+
"default": 100,
195+
"min": 0,
196+
"max": 255
197+
},
190198
"hideHideEndscreen": {
191199
"name": "Hide \"Hide Endscreen\" Button",
192200
"description": "Hides the \"Hide Endscreen\" button from EndLevelLayer. (Still clickable, just invisible.)\n\n<cy>(Enabling this option will also hide the sprite of the extra button added from enabling the \"Hide EndLevelLayer\" option.)</c>",

src/EndLevelLayer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#define managerMacro Manager::getSharedInstance()
88
#define getModBool Mod::get()->getSettingValue<bool>
9+
#define getModInt Mod::get()->getSettingValue<int64_t>
910
#define getModDouble Mod::get()->getSettingValue<double>
1011
#define getModString Mod::get()->getSettingValue<std::string>
1112

@@ -95,6 +96,10 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
9596
if (CCNode* title = bg->getChildByID("title")) static_cast<CCLabelBMFont*>(title)->setOpacity(0);
9697
}
9798
}
99+
if (const int opacity = std::clamp<int>(getModInt("backdropOpacity"), 0, 255); opacity != 100) {
100+
this->setCascadeOpacityEnabled(false);
101+
this->setOpacity(opacity);
102+
}
98103
}
99104
void applyPlatAttemptsAndJumpsOrFlukedFromPercent(GJGameLevel* theLevel) {
100105
Manager* manager = managerMacro;

0 commit comments

Comments
 (0)