From 24d883f67ce4ece4b1fd40b264689f4f40ba84ae Mon Sep 17 00:00:00 2001 From: Cvolton Date: Thu, 4 Jan 2024 23:53:50 +0100 Subject: [PATCH] ProfilePage: spawn username label asap --- src/hooks/ProfilePage.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/hooks/ProfilePage.cpp b/src/hooks/ProfilePage.cpp index fa66a77..5f16275 100644 --- a/src/hooks/ProfilePage.cpp +++ b/src/hooks/ProfilePage.cpp @@ -151,6 +151,10 @@ class $modify(BIProfilePage, ProfilePage) { m_buttons->addObject(shipBtn); } + if(auto usernameLabel = m_mainLayer->getChildByID("username-label")) { + usernameLabel->setVisible(false); + } + auto usernameNode = CCLabelBMFont::create(a2->m_userName.c_str(), "bigFont.fnt"); usernameNode->limitLabelWidth(a2->m_modBadge > 0 ? 140.f : 185.0f, 0.9f, 0.0f); auto usernameBtn = CCMenuItemSpriteExtra::create( @@ -165,7 +169,6 @@ class $modify(BIProfilePage, ProfilePage) { if(a2->m_userID != GameManager::sharedState()->m_playerUserID){ if(auto rankIcon = m_mainLayer->getChildByID("global-rank-icon")) { - log::debug("hiding rank"); rankIcon->setVisible(false); } @@ -252,11 +255,6 @@ class $modify(BIProfilePage, ProfilePage) { followHint->setVisible(false); } - if(auto usernameLabel = m_mainLayer->getChildByID("username-label")) { - log::debug("hiding username"); - usernameLabel->setVisible(false); - } - return true; }