-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add node ids for 2.0 vault and chamber of time (#109)
* add ids for 2.0 vault and chamber of time * fix "valtkeeper-button" typo
- Loading branch information
Showing
3 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include <Geode/Bindings.hpp> | ||
#include <Geode/modify/SecretLayer.hpp> | ||
#include <Geode/utils/cocos.hpp> | ||
#include <Geode/utils/NodeIDs.hpp> | ||
|
||
using namespace geode::prelude; | ||
using namespace geode::node_ids; | ||
|
||
$register_ids(SecretLayer) { | ||
setIDs( | ||
this, | ||
0, | ||
"background", | ||
"vault-name", | ||
"message", | ||
"textbox-background", | ||
"text-box", | ||
"menu" | ||
); | ||
auto menu = static_cast<CCMenu*>(this->getChildByID("menu")); | ||
setIDs( | ||
menu, | ||
0, | ||
"back-button", | ||
"vaultkeeper-button" | ||
); | ||
} | ||
|
||
struct SecretLayerIDs : Modify<SecretLayerIDs, SecretLayer> { | ||
static void onModify(auto& self) { | ||
if (!self.setHookPriority("SecretLayer::init", GEODE_ID_PRIORITY)) { | ||
log::warn("Failed to set SecretLayer::init hook priority, node IDs may not work properly"); | ||
} | ||
} | ||
|
||
bool init() { | ||
if(!SecretLayer::init()) return false; | ||
|
||
NodeIDs::get()->provide(this); | ||
|
||
return true; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include <Geode/Bindings.hpp> | ||
#include <Geode/modify/SecretLayer4.hpp> | ||
#include <Geode/utils/cocos.hpp> | ||
#include <Geode/utils/NodeIDs.hpp> | ||
|
||
using namespace geode::prelude; | ||
using namespace geode::node_ids; | ||
|
||
$register_ids(SecretLayer4) { | ||
setIDs( | ||
this, | ||
0, | ||
"background", | ||
"vault-name", | ||
"message", | ||
"textbox-background", | ||
"text-box", | ||
"menu" | ||
); | ||
auto menu = static_cast<CCMenu*>(this->getChildByID("menu")); | ||
setIDs( | ||
menu, | ||
0, | ||
"back-button", | ||
"vaultkeeper-button" | ||
); | ||
} | ||
|
||
struct SecretLayer4IDs : Modify<SecretLayer4IDs, SecretLayer4> { | ||
static void onModify(auto& self) { | ||
if (!self.setHookPriority("SecretLayer4::init", GEODE_ID_PRIORITY)) { | ||
log::warn("Failed to set SecretLayer4::init hook priority, node IDs may not work properly"); | ||
} | ||
} | ||
|
||
bool init() { | ||
if(!SecretLayer4::init()) return false; | ||
|
||
NodeIDs::get()->provide(this); | ||
|
||
return true; | ||
} | ||
}; |