Skip to content

Commit 2f70ed1

Browse files
committed
Added The Vault new design
1 parent d1b2707 commit 2f70ed1

File tree

3 files changed

+46
-7
lines changed

3 files changed

+46
-7
lines changed

mod.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
],
4646
"spritesheets": {
4747
"countries": ["resources/countries/*.png"],
48-
"badges": ["resources/badges/*.png"]
48+
"badges": ["resources/badges/*.png"],
49+
"scenes": ["resources/scenes/*.png"]
4950
}
5051
},
5152
"settings": {
@@ -226,6 +227,23 @@
226227
]
227228
}
228229
},
230+
"design-section": {
231+
"name": "Designs",
232+
"description": "This category is for changing settings to activate/desactivate <cy>designs</c> of the mod.",
233+
"type": "title"
234+
},
235+
"gauntletDesign": {
236+
"name": "New gauntlets design",
237+
"description": "Changes the design of the gauntlets in the main menu.",
238+
"type": "bool",
239+
"default": true
240+
},
241+
"secretLayerDesign": {
242+
"name": "The Vault design",
243+
"description": "Changes the design of The Vault.",
244+
"type": "bool",
245+
"default": true
246+
},
229247
"misc-section": {
230248
"name": "Miscellaneous",
231249
"description": "This category is for any other feature for <cy>GDUtils</c>.\nYou can choose whether to <cy>enable</c> or <cy>disable</c> some options if you do not want them.",
@@ -268,12 +286,6 @@
268286
"type": "bool",
269287
"default": true
270288
},
271-
"gauntletDesign": {
272-
"name": "New gauntlets design",
273-
"description": "Changes the design of the gauntlets in the main menu.",
274-
"type": "bool",
275-
"default": true
276-
},
277289
"previewIcons": {
278290
"name": "Preview Icons",
279291
"description": "Show some buttons to preview icons in the <cg>Icon Kit</c> for those who haven't been unlocked yet.",

resources/scenes/thevault.png

1.69 MB
Loading

src/Styles/TheVault.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include "../includes.h"
2+
#include <Geode/modify/SecretLayer.hpp>
3+
4+
class $modify(SecretLayer) {
5+
bool init() {
6+
if (!SecretLayer::init()) return false;
7+
8+
if (!Mod::get()->template getSettingValue<bool>("secretLayerDesign")) return true;
9+
10+
auto winSize = CCDirector::sharedDirector()->getWinSize();
11+
auto bg = CCSprite::createWithSpriteFrameName("thevault.png"_spr);
12+
13+
bg->setPosition(winSize / 2);
14+
bg->setZOrder(-1);
15+
bg->setScaleY(winSize.height / bg->getContentSize().height);
16+
bg->setScaleX(winSize.width / bg->getContentSize().width);
17+
this->addChild(bg);
18+
19+
// Get vault name
20+
auto vaultName = this->getChildByID("vault-name");
21+
if (vaultName) {
22+
vaultName->setVisible(false);
23+
}
24+
25+
return true;
26+
}
27+
};

0 commit comments

Comments
 (0)