From 452b09678c77332478593d299023c68fbe96e6b3 Mon Sep 17 00:00:00 2001 From: Chloe <25387744+qimiko@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:04:18 -0700 Subject: [PATCH] replace usages of getChildOfType --- loader/include/Geode/utils/NodeIDs.hpp | 2 +- loader/src/ids/MenuLayer.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/loader/include/Geode/utils/NodeIDs.hpp b/loader/include/Geode/utils/NodeIDs.hpp index f0f7a3d0..b2fad89f 100644 --- a/loader/include/Geode/utils/NodeIDs.hpp +++ b/loader/include/Geode/utils/NodeIDs.hpp @@ -14,7 +14,7 @@ namespace geode::node_ids { return child; } } else { - if (auto child = cocos::getChildOfType(node, index)) { + if (auto child = node->getChildByType(index)) { child->setID(id); return child; } diff --git a/loader/src/ids/MenuLayer.cpp b/loader/src/ids/MenuLayer.cpp index d94426a6..d5e8cf0d 100644 --- a/loader/src/ids/MenuLayer.cpp +++ b/loader/src/ids/MenuLayer.cpp @@ -48,7 +48,7 @@ $register_ids(MenuLayer) { setIDSafe(this, labelOffset++, "player-username"); // main menu - if (auto menu = getChildOfType(this, 0)) { + if (auto menu = this->getChildByType(0)) { menu->setID("main-menu"); auto playBtn = setIDSafe(menu, 0, "play-button"); auto iconBtn = setIDSafe(menu, 1, "icon-kit-button"); @@ -83,7 +83,7 @@ $register_ids(MenuLayer) { } // bottom menu - if (auto menu = getChildOfType(this, 1)) { + if (auto menu = this->getChildByType(1)) { menu->setID("bottom-menu"); auto ach = setIDSafe(menu, 0, "achievements-button"); setIDSafe(menu, 1, "settings-button"); @@ -110,7 +110,7 @@ $register_ids(MenuLayer) { } // social media menu - if (auto menu = getChildOfType(this, 2)) { + if (auto menu = this->getChildByType(2)) { menu->setID("social-media-menu"); setIDSafe(menu, 0, "robtop-logo-button"); setIDSafe(menu, 1, "facebook-button"); @@ -121,7 +121,7 @@ $register_ids(MenuLayer) { } // more games menu - if (auto menu = getChildOfType(this, 3)) { + if (auto menu = this->getChildByType(3)) { menu->setID("more-games-menu"); auto moreGamesBtn = setIDSafe(menu, 0, "more-games-button");