Skip to content

Commit

Permalink
add practice retry button to endlevellayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Jun 3, 2024
1 parent 7e14f2b commit 8b03dc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/EndLevelLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ inline CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {

$register_ids(EndLevelLayer) {
m_mainLayer->setID("main-layer");
if(auto hideMenu = setIDSafe(this, 1, "hide-layer-menu")) {
setIDSafe(hideMenu, 0, "hide-button");
}

int idx = 0;
setIDs(
Expand Down Expand Up @@ -124,6 +127,9 @@ inline CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {
if (auto leaderboardButton = ::getChildBySpriteFrameName(menu, "GJ_levelLeaderboardBtn_001.png")) {
leaderboardButton->setID("leaderboard-button");
}
if (auto leaderboardButton = ::getChildBySpriteFrameName(menu, "GJ_restartCheckBtn_001.png")) {
leaderboardButton->setID("practice-retry-button");
}

int currentCoin = 1;
std::vector<CCPoint> coinPos;
Expand Down

0 comments on commit 8b03dc3

Please sign in to comment.