//
// SetupTriggerPopup::createCustomToggleValueControl from 0x100131f6c to 0x100132118 (428 bytes)
//
// 68 xrefs:
// > SetupTimerControlTriggerPopup::init @ 0x10002e228
// > SetupTimerControlTriggerPopup::init @ 0x10002e298
// > SetupPickupTriggerPopup::init @ 0x1000435c0
// > SetupPickupTriggerPopup::init @ 0x100043630
// > CustomizeObjectSettingsPopup::init @ 0x100050e38
// > CustomizeObjectSettingsPopup::init @ 0x100050ea4
// > CustomizeObjectSettingsPopup::init @ 0x100050f14
// > SetupAdvFollowPopup::init @ 0x1000605a8
// > SetupAdvFollowPopup::init @ 0x10006061c
// > SetupAdvFollowPopup::init @ 0x10006068c
// > SetupGameplayOffsetPopup::init @ 0x10019f348
// > SetupGameplayOffsetPopup::init @ 0x10019f3bc
// > SetupKeyframePopup::init @ 0x1001b4bf0
// > SetupKeyframePopup::init @ 0x1001b4c60
// > SetupStaticCameraPopup::init @ 0x1001d0de0
// > SetupStaticCameraPopup::init @ 0x1001d0e54
// > SetupSequenceTriggerPopup::init @ 0x1001d2d34
// > SetupSequenceTriggerPopup::init @ 0x1001d2da4
// > SetupSequenceTriggerPopup::init @ 0x1001d2e10
// > SetupSequenceTriggerPopup::init @ 0x1001d2e84
// > SetupSequenceTriggerPopup::init @ 0x1001d2ef4
// > SetupRotatePopup::init @ 0x100268658
// > SetupRotatePopup::init @ 0x1002686c8
// > SetupRotatePopup::init @ 0x100268738
// > SetupMoveCommandPopup::init @ 0x100274160
// > SetupMoveCommandPopup::init @ 0x1002741d0
// > SelectEventLayer::addToggle @ 0x100408da8
// > UIObjectSettingsPopup::init @ 0x10040ae84
// > UIObjectSettingsPopup::init @ 0x10040aef0
// > UIObjectSettingsPopup::init @ 0x10040af5c
// > UIObjectSettingsPopup::init @ 0x10040afcc
// > UIObjectSettingsPopup::init @ 0x10040b124
// > UIObjectSettingsPopup::init @ 0x10040b190
// > UIObjectSettingsPopup::init @ 0x10040b1fc
// > UIObjectSettingsPopup::init @ 0x10040b26c
// > SetupItemEditTriggerPopup::init @ 0x10040bbb4
// > SetupItemEditTriggerPopup::init @ 0x10040bc28
// > SetupItemEditTriggerPopup::init @ 0x10040bc9c
// > SetupItemEditTriggerPopup::init @ 0x10040bd10
// > SetupItemEditTriggerPopup::init @ 0x10040bd84
// > SetupItemEditTriggerPopup::init @ 0x10040be8c
// > SetupItemEditTriggerPopup::init @ 0x10040befc
// > SetupItemEditTriggerPopup::init @ 0x10040bf6c
// > SetupItemEditTriggerPopup::init @ 0x10040bfdc
// > SetupItemEditTriggerPopup::init @ 0x10040c04c
// > SetupItemEditTriggerPopup::init @ 0x10040c1e4
// > SetupItemEditTriggerPopup::init @ 0x10040c258
// > SetupItemEditTriggerPopup::init @ 0x10040c2cc
// > SetupItemCompareTriggerPopup::init @ 0x10040d9a4
// > SetupItemCompareTriggerPopup::init @ 0x10040da18
// > SetupItemCompareTriggerPopup::init @ 0x10040da8c
// > SetupItemCompareTriggerPopup::init @ 0x10040db00
// > SetupItemCompareTriggerPopup::init @ 0x10040db74
// > SetupItemCompareTriggerPopup::init @ 0x10040dc8c
// > SetupItemCompareTriggerPopup::init @ 0x10040dcfc
// > SetupItemCompareTriggerPopup::init @ 0x10040dd6c
// > SetupItemCompareTriggerPopup::init @ 0x10040dddc
// > SetupItemCompareTriggerPopup::init @ 0x10040de4c
// > SetupStopTriggerPopup::init @ 0x100411790
// > SetupStopTriggerPopup::init @ 0x1004117fc
// > SetupStopTriggerPopup::init @ 0x10041186c
// > SetupOptionsTriggerPopup::addOption @ 0x100413df4
// > SetupOptionsTriggerPopup::addOption @ 0x100413e64
// > SetItemIDLayer::init @ 0x100419fa0
// > SetItemIDLayer::init @ 0x10041a014
// > SetItemIDLayer::init @ 0x10041a0a4
// > SetItemIDLayer::init @ 0x10041a114
// > SetItemIDLayer::init @ 0x10041a188
//
// 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
//
__int64 __fastcall SetupTriggerPopup::createCustomToggleValueControl(
SetupTriggerPopup *a1,
__int64 a2,
bool a3,
int a4,
__int64 a5,
__int64 *a6,
int a7,
int a8,
int a9)
{
__n128 v16; // q0
__n128 v17; // q1
_DWORD *v18; // x0
__int64 v19; // x25
cocos2d::CCNode *m_buttonMenu; // x20
cocos2d::CCObject *m_mainLayer; // x28
CCMenuItemToggler *v22; // x20
cocos2d::CCArray *GroupContainer; // [xsp+20h] [xbp-90h]
cocos2d::CCArray *PageContainer; // [xsp+28h] [xbp-88h]
__int64 v26; // [xsp+30h] [xbp-80h] BYREF
cocos2d::CCPoint v27; // [xsp+38h] [xbp-78h] BYREF
void *__p[2]; // [xsp+40h] [xbp-70h] BYREF
__int64 v29; // [xsp+50h] [xbp-60h]
__int64 v30; // [xsp+58h] [xbp-58h] BYREF
PageContainer = SetupTriggerPopup::getPageContainer(a1, a8);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a9);
if ( a7 )
{
v16.n128_u32[0] = 0;
v17.n128_u32[0] = 4.0;
}
else
{
v16.n128_u32[0] = 8.0;
v17.n128_u32[0] = 0;
}
v18 = sub_100022980(v16, v17, &v30);
v19 = sub_10024A15C(v18);
if ( *(char *)(a5 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a5, *(_QWORD *)(a5 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a5;
v29 = *(_QWORD *)(a5 + 16);
}
m_buttonMenu = a1->m_buttonMenu;
sub_1000229B8((__int64 *)&v27, a6);
m_mainLayer = a1->m_mainLayer;
sub_1000229B8(&v26, &v30);
v22 = GameToolbox::createToggleButton(
(const char *)__p,
(void (__cdecl *)(cocos2d::CCObject *))0x5B0,
1u,
a3,
m_buttonMenu,
&v27,
a1,
m_mainLayer,
0.7,
0.35,
110.0,
(float *)&v26,
"bigFont.fnt",
a7,
0,
v19);
if ( SHIBYTE(v29) < 0 )
operator delete(__p[0]);
((void (__fastcall *)(CCMenuItemToggler *, __int64))v22->setTag)(v22, a2);
if ( a4 )
v22->m_notClickable = 1;
cocos2d::CCDictionary::setObject(a1->m_customValueToggles, v22, (int)a2);
sub_10024A360(PageContainer, v19);
if ( a9 >= 1 )
sub_10024A360(GroupContainer, v19);
return v19;
}