//
// SetupTriggerPopup::goToPage from 0x1404743b0 to 0x140474632 (642 bytes)
//
// 23 xrefs:
// > SetupRotateCommandPopup::init @ 0x1402a8eb2
// > SetupAdvFollowPopup::init @ 0x140405550
// > SetupAdvFollowPopup::updateMode @ 0x140405b6e
// > SetupAreaMoveTriggerPopup::init @ 0x14040c2a1
// > SetupAreaTransformTriggerPopup::init @ 0x14040e94d
// > SetupAreaRotateTriggerPopup::init @ 0x14040f0b1
// > SetupAreaFadeTriggerPopup::init @ 0x14040f7ff
// > SetupAreaTintTriggerPopup::init @ 0x1404102ef
// > SetupAreaTriggerPopup::init @ 0x140410e24
// > SetupKeyframeAnimPopup::init @ 0x1404251ca
// > SetupOptionsTriggerPopup::init @ 0x140436698
// > SetupSFXPopup::init @ 0x140448467
// > SetupSFXEditPopup::init @ 0x14044a10b
// > SetupSongTriggerPopup::init @ 0x14045d523
// > SetupSongTriggerPopup::init @ 0x14045d532
// > SetupSongTriggerPopup::valueDidChange @ 0x14045dc1c
// > SetupSpawnPopup::init @ 0x14045edeb
// > SelectEventLayer::init @ 0x14046752f
// > SetupTriggerPopup::onPage @ 0x140474336
// > ??> @ 0x1406a551c
// > ??> @ 0x1406a553c
// > ??> @ 0x1406a554c
// > ??> @ 0x1406db42c
//
// 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)
{
unsigned int v5; // ebx
cocos2d::CCArray *m_pageContainers; // rcx
unsigned int v7; // r12d
cocos2d::CCArray *v8; // rax
cocos2d::CCArray *v9; // rbp
bool v10; // r15
unsigned int v11; // edi
struct cocos2d::CCObject *v12; // rbx
int v13; // eax
struct cocos2d::CCObject *v14; // rax
struct cocos2d::CCObject *v15; // rsi
cocos2d::CCObject_vtbl *v16; // rbx
unsigned __int8 v17; // al
CCMenuItemSpriteExtra *m_prevButton; // rcx
bool v19; // r13
CCMenuItemSpriteExtra *m_nextButton; // rcx
unsigned int i; // r15d
cocos2d::CCArray *v22; // rsi
unsigned int v23; // edi
int j; // ebp
struct cocos2d::CCObject *v25; // rbx
v5 = a2;
if ( cocos2d::CCArray::count(a1->m_pageContainers) && cocos2d::CCArray::count(a1->m_pageContainers) >= v5 )
{
m_pageContainers = a1->m_pageContainers;
v7 = 0;
a1->m_page = v5;
a1->m_hideAll = a3;
if ( cocos2d::CCArray::count(m_pageContainers) )
{
do
{
v8 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, v7);
v9 = v8;
v10 = v7 == v5 && !a3;
v11 = 0;
if ( cocos2d::CCArray::count(v8) )
{
do
{
v12 = cocos2d::CCArray::objectAtIndex(v9, v11);
if ( !cocos2d::CCDictionary::objectForKey(a1->m_disabledEasingButtons, v12->m_uID) )
((void (__fastcall *)(struct cocos2d::CCObject *, bool))v12->__vftable[4].update)(v12, v10);
v13 = v12->getTag(v12);
v14 = cocos2d::CCDictionary::objectForKey(a1->m_inputNodes, v13);
v15 = v14;
if ( v14 )
{
v16 = v14->__vftable;
v17 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v14->__vftable[4].encodeWithCoder)(v14);
v16[12].encodeWithCoder(v15, (DS_Dictionary *)v17);
}
++v11;
}
while ( v11 < cocos2d::CCArray::count(v9) );
v5 = a2;
}
++v7;
}
while ( v7 < cocos2d::CCArray::count(a1->m_pageContainers) );
}
m_prevButton = a1->m_prevButton;
v19 = !a3;
if ( m_prevButton )
m_prevButton->setVisible(m_prevButton, v19);
m_nextButton = a1->m_nextButton;
if ( m_nextButton )
m_nextButton->setVisible(m_nextButton, v19);
if ( cocos2d::CCArray::count(a1->m_groupContainers) )
{
for ( i = 0; i < cocos2d::CCArray::count(a1->m_groupContainers); ++i )
{
v22 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_groupContainers, i);
v23 = 0;
for ( j = v22->getTag(v22); v23 < cocos2d::CCArray::count(v22); ++v23 )
{
v25 = cocos2d::CCArray::objectAtIndex(v22, v23);
if ( ((unsigned __int8 (__fastcall *)(struct cocos2d::CCObject *))v25->__vftable[4].encodeWithCoder)(v25) )
{
if ( !j )
((void (__fastcall *)(struct cocos2d::CCObject *, _QWORD))v25->__vftable[4].update)(v25, 0);
}
}
}
}
a1->pageChanged(a1);
}
}