//
// LevelListLayer::onBack from 0x591f18 to 0x59200c (244 bytes)
//
// 0 xrefs:
//
// 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 LevelListLayer::onBack(LevelListLayer *a1, cocos2d::CCObject *a2)
{
_BOOL4 m_exiting; // r4
CCTextInputNode *m_titleInput; // r0
GameLevelManager *v6; // r8
GameLevelManager *v7; // r5
cocos2d::CCScene *SearchScene; // r5
cocos2d::CCDirector *v9; // r4
cocos2d::CCTransitionFade *v10; // r0
GJSearchObject *v11; // r0
GJSearchObject *v12[2]; // [sp+0h] [bp-8h] BYREF
v12[0] = (GJSearchObject *)a1;
v12[1] = (GJSearchObject *)a2;
m_exiting = a1->m_exiting;
if ( !a1->m_exiting )
{
a1->setKeypadEnabled(a1, a1->m_exiting);
m_titleInput = a1->m_titleInput;
if ( m_titleInput )
m_titleInput->onClickTrackNode(m_titleInput, m_exiting);
LevelListLayer::verifyListName(a1);
v6 = GameLevelManager::sharedState();
sub_775C20(v12);
sub_775D40(&v6->m_searchKey, v12);
sub_774008(v12);
if ( a1->m_levelList->m_listType == Editor )
{
v7 = GameLevelManager::sharedState();
GameLevelManager::sharedState();
sub_775C20(v12);
SearchScene = GameLevelManager::getSearchScene(v7, (const char *)v12[0]);
sub_774008(v12);
if ( GameLevelManager::sharedState()->m_returnToLocalLevels || !SearchScene )
{
GameLevelManager::sharedState()->m_returnToLocalLevels = 0;
v11 = (GJSearchObject *)GJSearchObject::create(102);
SearchScene = LevelBrowserLayer::scene(v11);
}
v9 = cocos2d::CCDirector::sharedDirector();
v10 = cocos2d::CCTransitionFade::create(0.5, SearchScene);
cocos2d::CCDirector::replaceScene(v9, v10);
}
else
{
LevelBrowserLayer::onBack(a1, a2);
}
}
}