//
// LevelBrowserLayer::updatePageLabel from 0x6e8d0c to 0x6e8df8 (236 bytes)
//
// 3 xrefs:
// > LevelBrowserLayer::updateLevelsLabel @ 0x6e8e7c
// > LevelBrowserLayer::init @ 0x6eaf6c
// > ??> @ 0x4e0c0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void LevelBrowserLayer::updatePageLabel(LevelBrowserLayer *a1)
{
cocos2d::CCLabelBMFont *m_pageText; // x20
GJSearchObject *m_searchObject; // x1
unsigned __int64 v3; // x1
void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // x22
cocos2d::CCString *v6; // x0
const char *CString; // x0
cocos2d::CCLabelBMFont *m_folderText; // x20
GJSearchObject *v9; // x0
const char *m_folder; // x1
void (__fastcall *v11)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // x21
cocos2d::CCString *v12; // x0
const char *v13; // x0
CCMenuItemSpriteExtra *m_lastBtn; // x0
m_pageText = a1->m_pageText;
if ( m_pageText )
{
m_searchObject = a1->m_searchObject;
if ( m_searchObject )
v3 = (unsigned int)(m_searchObject->m_page + 1);
else
v3 = 1;
setString = m_pageText->setString;
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v3);
CString = cocos2d::CCString::getCString(v6);
setString(m_pageText, (const unsigned __int8 *)CString);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_pageText, 32.0, 0.8, 0.0);
m_folderText = a1->m_folderText;
if ( m_folderText )
{
v9 = a1->m_searchObject;
if ( v9 )
m_folder = (const char *)(unsigned int)v9->m_folder;
else
m_folder = nullptr;
v11 = m_folderText->setString;
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", m_folder);
v13 = cocos2d::CCString::getCString(v12);
v11(m_folderText, (const unsigned __int8 *)v13);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_folderText, 24.0, 0.55, 0.0);
}
m_lastBtn = a1->m_lastBtn;
if ( m_lastBtn )
m_lastBtn->setVisible(m_lastBtn, a1->m_lastPage > 0);
}
}