//
// SetupTriggerPopup::createCustomToggleValueControl from 0x9e6530 to 0x9e6780 (592 bytes)
//
// 69 xrefs:
// > CustomizeObjectSettingsPopup::init @ 0x844420
// > CustomizeObjectSettingsPopup::init @ 0x84449c
// > CustomizeObjectSettingsPopup::init @ 0x844518
// > SetupMoveCommandPopup::init @ 0x8e4f38
// > SetupMoveCommandPopup::init @ 0x8e4fac
// > SetItemIDLayer::init @ 0x94bc94
// > SetItemIDLayer::init @ 0x94bd0c
// > SetItemIDLayer::init @ 0x94bda4
// > SetItemIDLayer::init @ 0x94be20
// > SetItemIDLayer::init @ 0x94be9c
// > SetupPickupTriggerPopup::init @ 0x957b10
// > SetupPickupTriggerPopup::init @ 0x957b88
// > SetupRotatePopup::init @ 0x958928
// > SetupRotatePopup::init @ 0x9589a8
// > SetupRotatePopup::init @ 0x958a18
// > SetupStaticCameraPopup::init @ 0x96b15c
// > SetupStaticCameraPopup::init @ 0x96b1d4
// > SetupOptionsTriggerPopup::addOption @ 0x9e24b4
// > SetupOptionsTriggerPopup::addOption @ 0x9e2534
// > SetupGameplayOffsetPopup::init @ 0x9f070c
// > SetupGameplayOffsetPopup::init @ 0x9f0788
// > SetupAdvFollowPopup::init @ 0xa18de0
// > SetupAdvFollowPopup::init @ 0xa18e58
// > SetupAdvFollowPopup::init @ 0xa18ed0
// > SetupKeyframePopup::init @ 0xa3b81c
// > SetupKeyframePopup::init @ 0xa3b89c
// > UIObjectSettingsPopup::init @ 0xa47874
// > UIObjectSettingsPopup::init @ 0xa478f0
// > UIObjectSettingsPopup::init @ 0xa4796c
// > UIObjectSettingsPopup::init @ 0xa479ec
// > UIObjectSettingsPopup::init @ 0xa47b54
// > UIObjectSettingsPopup::init @ 0xa47bd0
// > UIObjectSettingsPopup::init @ 0xa47c4c
// > UIObjectSettingsPopup::init @ 0xa47cc8
// > SetupItemEditTriggerPopup::init @ 0xa4a800
// > SetupItemEditTriggerPopup::init @ 0xa4a87c
// > SetupItemEditTriggerPopup::init @ 0xa4a8f8
// > SetupItemEditTriggerPopup::init @ 0xa4a974
// > SetupItemEditTriggerPopup::init @ 0xa4a9f0
// > SetupItemEditTriggerPopup::init @ 0xa4ab08
// > SetupItemEditTriggerPopup::init @ 0xa4ab80
// > SetupItemEditTriggerPopup::init @ 0xa4abf8
// > SetupItemEditTriggerPopup::init @ 0xa4ac70
// > SetupItemEditTriggerPopup::init @ 0xa4ace8
// > SetupItemEditTriggerPopup::init @ 0xa4ae98
// > SetupItemEditTriggerPopup::init @ 0xa4af10
// > SetupItemEditTriggerPopup::init @ 0xa4af88
// > SetupItemCompareTriggerPopup::init @ 0xa4cf5c
// > SetupItemCompareTriggerPopup::init @ 0xa4cfd4
// > SetupItemCompareTriggerPopup::init @ 0xa4d050
// > SetupItemCompareTriggerPopup::init @ 0xa4d0cc
// > SetupItemCompareTriggerPopup::init @ 0xa4d148
// > SetupItemCompareTriggerPopup::init @ 0xa4d270
// > SetupItemCompareTriggerPopup::init @ 0xa4d2e8
// > SetupItemCompareTriggerPopup::init @ 0xa4d360
// > SetupItemCompareTriggerPopup::init @ 0xa4d3d8
// > SetupItemCompareTriggerPopup::init @ 0xa4d450
// > SetupStopTriggerPopup::init @ 0xa52374
// > SetupStopTriggerPopup::init @ 0xa523f0
// > SetupStopTriggerPopup::init @ 0xa5246c
// > SelectEventLayer::addToggle @ 0xa544a0
// > SetupSequenceTriggerPopup::init @ 0xa59274
// > SetupSequenceTriggerPopup::init @ 0xa592ec
// > SetupSequenceTriggerPopup::init @ 0xa59364
// > SetupSequenceTriggerPopup::init @ 0xa593e0
// > SetupSequenceTriggerPopup::init @ 0xa5945c
// > SetupTimerControlTriggerPopup::init @ 0xa7cea4
// > SetupTimerControlTriggerPopup::init @ 0xa7cf1c
// > ??> @ 0x2f148
//
// 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
//
cocos2d::CCArray *__fastcall SetupTriggerPopup::createCustomToggleValueControl(
SetupTriggerPopup *a1,
int a2,
bool a3,
unsigned __int8 a4,
int a5,
const cocos2d::CCPoint *a6,
unsigned __int8 a7,
int a8,
int a9)
{
int v12; // w25
cocos2d::CCArray *v13; // x0
cocos2d::CCArray *v14; // x20
cocos2d::CCNode *m_buttonMenu; // x26
cocos2d::CCObject *m_mainLayer; // x24
CCMenuItemToggler *v17; // x22
void *v18; // x0
unsigned int *v20; // x2
int v21; // w1
cocos2d::CCArray *GroupContainer; // [xsp+98h] [xbp+68h]
int v23; // [xsp+A0h] [xbp+70h]
cocos2d::CCArray *PageContainer; // [xsp+A8h] [xbp+78h]
cocos2d::CCPoint v26; // [xsp+B8h] [xbp+88h] BYREF
__int64 v27; // [xsp+C0h] [xbp+90h] BYREF
cocos2d::CCPoint v28; // [xsp+C8h] [xbp+98h] BYREF
cocos2d::CCPoint v29; // [xsp+D0h] [xbp+A0h] BYREF
v23 = a4;
v12 = a7;
PageContainer = SetupTriggerPopup::getPageContainer(a1, a8);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a9);
if ( v12 )
v13 = (cocos2d::CCArray *)cocos2d::CCPoint::CCPoint(&v26, 0.0, 4.0);
else
v13 = (cocos2d::CCArray *)cocos2d::CCPoint::CCPoint(&v26, 8.0, 0.0);
v14 = (cocos2d::CCArray *)cocos2d::CCArray::create(v13);
sub_D18D28(&v27);
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v28, a6);
m_mainLayer = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v29, &v26);
v17 = GameToolbox::createToggleButton(
0.7,
0.35,
110.0,
(__int64)&v27,
(void (__cdecl *)(cocos2d::CCObject *))&elf_hash_bucket[238],
1u,
a3,
m_buttonMenu,
&v28,
a1,
m_mainLayer,
(float *)&v29,
(__int64)"bigFont.fnt",
v12,
0,
v14);
v18 = (void *)(v27 - 24);
if ( (__int64 *)(v27 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v20 = (unsigned int *)(v27 - 8);
do
v21 = __ldaxr(v20);
while ( __stlxr(v21 - 1, v20) );
}
else
{
v21 = *(_DWORD *)(v27 - 8);
*(_DWORD *)(v27 - 8) = v21 - 1;
}
if ( v21 <= 0 )
operator delete(v18);
}
v17->setTag(v17, a2);
if ( v23 )
v17->m_notClickable = 1;
cocos2d::CCDictionary::setObject(a1->m_customValueToggles, v17, a2);
cocos2d::CCArray::addObjectsFromArray(PageContainer, v14);
if ( a9 > 0 )
cocos2d::CCArray::addObjectsFromArray(GroupContainer, v14);
return v14;
}