Skip to content

Commit

Permalink
fix duplicate ProfilePage menus
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Feb 6, 2024
1 parent 393f29d commit 12b814c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ProfilePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ struct ProfilePageIDs : Modify<ProfilePageIDs, ProfilePage> {
playerMenu->setContentSize({340, 35});
playerMenu->updateLayout();
playerMenu->setZOrder(10);

m_buttons->addObject(playerMenu);

size_t socialMediaCount = 0;
if(!m_score->m_youtubeURL.empty()) {
Expand Down Expand Up @@ -307,6 +307,7 @@ struct ProfilePageIDs : Modify<ProfilePageIDs, ProfilePage> {
bottomMenu->setPositionX(winSize.width / 2);
bottomMenu->setContentSize({164, 35});
bottomMenu->updateLayout();
m_buttons->addObject(bottomMenu);

//only allow featured levels calls setVisible so we're safe here
static_cast<CCNode*>(m_buttons->objectAtIndex(idx++))->setID("my-levels-button");
Expand All @@ -333,6 +334,7 @@ struct ProfilePageIDs : Modify<ProfilePageIDs, ProfilePage> {
bottomMenu->setPositionX(winSize.width / 2);
bottomMenu->setContentSize({340, 35});
bottomMenu->updateLayout();
m_buttons->addObject(bottomMenu);
}

if(auto statsMenu = m_mainLayer->getChildByID("stats-menu")) {
Expand Down

0 comments on commit 12b814c

Please sign in to comment.