mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
add setIDs overload for automatically incrementing current node ID index
This commit is contained in:
parent
264f773e80
commit
f140e67bef
1 changed files with 9 additions and 0 deletions
|
@ -30,6 +30,15 @@ namespace geode::node_ids {
|
|||
}
|
||||
}
|
||||
|
||||
template <typename ...Args>
|
||||
void setIDs(CCNode* node, int* startIndex, Args... args) {
|
||||
for (auto i : { args... }) {
|
||||
if (setIDSafe(node, *startIndex, i)) {
|
||||
*startIndex += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void switchToMenu(CCNode* node, CCNode* menu) {
|
||||
if (!node || !menu) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue