mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-16 16:29:43 -05:00
GJGarageLayer ids
This commit is contained in:
parent
5921c96bcb
commit
08df8c627a
1 changed files with 72 additions and 0 deletions
72
loader/src/ids/GJGarageLayer.cpp
Normal file
72
loader/src/ids/GJGarageLayer.cpp
Normal file
|
@ -0,0 +1,72 @@
|
|||
#include <Geode/Modify.hpp>
|
||||
#include <Geode/Bindings.hpp>
|
||||
#include <Geode/utils/cocos.hpp>
|
||||
#include "AddIDs.hpp"
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
|
||||
$register_ids(GJGarageLayer) {
|
||||
setIDSafe(this, 2, "username-label");
|
||||
setIDSafe(this, 6, "player-icon");
|
||||
|
||||
if (auto menu = getChildOfType<CCMenu>(this, 0)) {
|
||||
menu->setID("icon-select-menu");
|
||||
|
||||
setIDs(menu, 0,
|
||||
"cube-button",
|
||||
"ship-button",
|
||||
"ball-button",
|
||||
"ufo-button",
|
||||
"wave-button",
|
||||
"robot-button",
|
||||
"spider-button",
|
||||
"trail-button",
|
||||
"death-effect-button"
|
||||
);
|
||||
}
|
||||
|
||||
setIDs(this, 10,
|
||||
"cube-selection-menu",
|
||||
"ship-selection-menu",
|
||||
"ball-selection-menu",
|
||||
"ufo-selection-menu",
|
||||
"wave-selection-menu",
|
||||
"robot-selection-menu",
|
||||
"spider-selection-menu",
|
||||
"trail-selection-menu",
|
||||
"death-effect-selection-menu",
|
||||
|
||||
"color-1-cursor",
|
||||
"color-2-cursor",
|
||||
|
||||
"color-selection-menu"
|
||||
);
|
||||
|
||||
if (auto menu = getChildOfType<CCMenu>(this, 11)) {
|
||||
menu->setID("top-left-menu");
|
||||
|
||||
setIDs(menu, 0,
|
||||
"back-button",
|
||||
"shop-button",
|
||||
"shards-button"
|
||||
);
|
||||
|
||||
detachAndCreateMenu(
|
||||
menu,
|
||||
"shards-button-menu",
|
||||
ColumnLayout::create(),
|
||||
menu->getChildByID("shards-button")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class $modify(GJGarageLayer) {
|
||||
bool init() {
|
||||
if (!GJGarageLayer::init())
|
||||
return false;
|
||||
|
||||
NodeIDs::get()->provide(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue