//
// SetupTriggerPopup::goToPage from 0x5417b8 to 0x5418c4 (268 bytes)
//
// 19 xrefs:
// > SetupSpawnPopup::init @ 0x4bcba8
// > SetupRotateCommandPopup::init @ 0x4e15d2
// > SetupSongTriggerPopup::updateApplyPrepare @ 0x52504c
// > SetupSongTriggerPopup::init @ 0x5257ce
// > SetupOptionsTriggerPopup::init @ 0x5407e8
// > SetupTriggerPopup::onPage @ 0x5418fe
// > SetupTriggerPopup::hideAll @ 0x541906
// > SetupAreaMoveTriggerPopup::init @ 0x55943a
// > SetupAreaTransformTriggerPopup::init @ 0x559aa6
// > SetupAreaRotateTriggerPopup::init @ 0x559ee6
// > SetupAreaFadeTriggerPopup::init @ 0x55a384
// > SetupAreaTintTriggerPopup::init @ 0x55aaec
// > SetupAreaTriggerPopup::init @ 0x55ae9c
// > SetupAdvFollowPopup::init @ 0x560dea
// > SetupAdvFollowPopup::updateMode @ 0x56141c
// > SetupKeyframeAnimPopup::init @ 0x573990
// > SetupSFXPopup::init @ 0x576c2e
// > SetupSFXEditPopup::init @ 0x577326
// > SelectEventLayer::init @ 0x57fc6a
//
// 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 SetupTriggerPopup::goToPage(SetupTriggerPopup *a1, int a2, bool a3)
{
_BOOL4 v5; // r6
unsigned int v6; // r5
cocos2d::CCArray *v7; // r0
unsigned int v8; // r8
int v9; // r11
cocos2d::CCArray *v10; // r9
intptr_t *v11; // r10
intptr_t v12; // r0
cocos2d::CCObject *v13; // r0
int v14; // r0
CCMenuItemSpriteExtra *m_prevButton; // r0
CCMenuItemSpriteExtra *m_nextButton; // r0
cocos2d::CCDictionary *m_inputNodes; // [sp+8h] [bp-Ch]
cocos2d::CCDictionary *isEqual; // [sp+8h] [bp-Ch]
cocos2d::CCObject *v19; // [sp+Ch] [bp-8h]
v5 = a3;
if ( cocos2d::CCArray::count(a1->m_pageContainers)
&& cocos2d::CCArray::count(a1->m_pageContainers) >= (unsigned int)a2 )
{
v6 = 0;
a1->m_page = a2;
a1->m_hideAll = v5;
while ( v6 < cocos2d::CCArray::count(a1->m_pageContainers) )
{
v7 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, v6);
v8 = 0;
v9 = v6 == a2 && !v5;
v10 = v7;
while ( v8 < cocos2d::CCArray::count(v10) )
{
v11 = (intptr_t *)cocos2d::CCArray::objectAtIndex(v10, v8);
if ( !cocos2d::CCDictionary::objectForKey(a1->m_disabledEasingButtons, v11[1]) )
(*(void (__fastcall **)(intptr_t *, int))(*v11 + 164))(v11, v9);
m_inputNodes = a1->m_inputNodes;
v12 = (*(int (__fastcall **)(intptr_t *))(*v11 + 32))(v11);
v13 = cocos2d::CCDictionary::objectForKey(m_inputNodes, v12);
if ( v13 )
{
v19 = v13;
isEqual = (cocos2d::CCDictionary *)v13->__vftable[12].isEqual;
v14 = ((int (__fastcall *)(cocos2d::CCObject *))v13->__vftable[4].~CCObject_0)(v13);
((void (__fastcall *)(cocos2d::CCObject *, int))isEqual)(v19, v14);
}
++v8;
}
++v6;
}
m_prevButton = a1->m_prevButton;
if ( m_prevButton )
m_prevButton->setVisible(m_prevButton, !v5);
m_nextButton = a1->m_nextButton;
if ( m_nextButton )
m_nextButton->setVisible(m_nextButton, !v5);
SetupTriggerPopup::refreshGroupVisibility(a1);
a1->pageChanged(a1);
}
}