Skip to content

Commit

Permalink
Added The Vault new design
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouca committed Nov 17, 2024
1 parent d1b2707 commit 2f70ed1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
26 changes: 19 additions & 7 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
],
"spritesheets": {
"countries": ["resources/countries/*.png"],
"badges": ["resources/badges/*.png"]
"badges": ["resources/badges/*.png"],
"scenes": ["resources/scenes/*.png"]
}
},
"settings": {
Expand Down Expand Up @@ -226,6 +227,23 @@
]
}
},
"design-section": {
"name": "Designs",
"description": "This category is for changing settings to activate/desactivate <cy>designs</c> of the mod.",
"type": "title"
},
"gauntletDesign": {
"name": "New gauntlets design",
"description": "Changes the design of the gauntlets in the main menu.",
"type": "bool",
"default": true
},
"secretLayerDesign": {
"name": "The Vault design",
"description": "Changes the design of The Vault.",
"type": "bool",
"default": true
},
"misc-section": {
"name": "Miscellaneous",
"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.",
Expand Down Expand Up @@ -268,12 +286,6 @@
"type": "bool",
"default": true
},
"gauntletDesign": {
"name": "New gauntlets design",
"description": "Changes the design of the gauntlets in the main menu.",
"type": "bool",
"default": true
},
"previewIcons": {
"name": "Preview Icons",
"description": "Show some buttons to preview icons in the <cg>Icon Kit</c> for those who haven't been unlocked yet.",
Expand Down
Binary file added resources/scenes/thevault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions src/Styles/TheVault.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "../includes.h"
#include <Geode/modify/SecretLayer.hpp>

class $modify(SecretLayer) {
bool init() {
if (!SecretLayer::init()) return false;

if (!Mod::get()->template getSettingValue<bool>("secretLayerDesign")) return true;

auto winSize = CCDirector::sharedDirector()->getWinSize();
auto bg = CCSprite::createWithSpriteFrameName("thevault.png"_spr);

bg->setPosition(winSize / 2);
bg->setZOrder(-1);
bg->setScaleY(winSize.height / bg->getContentSize().height);
bg->setScaleX(winSize.width / bg->getContentSize().width);
this->addChild(bg);

// Get vault name
auto vaultName = this->getChildByID("vault-name");
if (vaultName) {
vaultName->setVisible(false);
}

return true;
}
};

0 comments on commit 2f70ed1

Please sign in to comment.