//
// SetupTriggerPopup::createCustomToggleValueControl from 0x140476fb0 to 0x14047722e (638 bytes)
//
// 69 xrefs:
// > CustomizeObjectSettingsPopup::init @ 0x1400aa369
// > CustomizeObjectSettingsPopup::init @ 0x1400aa3e5
// > CustomizeObjectSettingsPopup::init @ 0x1400aa473
// > SetupMoveCommandPopup::init @ 0x1402815f4
// > SetupMoveCommandPopup::init @ 0x140281687
// > SetItemIDLayer::init @ 0x140401628
// > SetItemIDLayer::init @ 0x1404016c2
// > SetItemIDLayer::init @ 0x140401762
// > SetItemIDLayer::init @ 0x1404017f3
// > SetItemIDLayer::init @ 0x140401879
// > SetupAdvFollowPopup::init @ 0x140402e08
// > SetupAdvFollowPopup::init @ 0x140402e70
// > SetupAdvFollowPopup::init @ 0x140402ed8
// > SetupKeyframePopup::init @ 0x140425aef
// > SetupKeyframePopup::init @ 0x140425b79
// > SetupOptionsTriggerPopup::addOption @ 0x14043685e
// > SetupOptionsTriggerPopup::addOption @ 0x1404368fa
// > SetupPickupTriggerPopup::init @ 0x140436f41
// > SetupPickupTriggerPopup::init @ 0x140436fd0
// > SetupGameplayOffsetPopup::init @ 0x14044249a
// > SetupGameplayOffsetPopup::init @ 0x14044252b
// > SetupRotatePopup::init @ 0x140442d62
// > SetupRotatePopup::init @ 0x140442e00
// > SetupRotatePopup::init @ 0x140442e98
// > SetupSequenceTriggerPopup::init @ 0x140444278
// > SetupSequenceTriggerPopup::init @ 0x14044430e
// > SetupSequenceTriggerPopup::init @ 0x1404443a0
// > SetupSequenceTriggerPopup::init @ 0x140444437
// > SetupSequenceTriggerPopup::init @ 0x1404444ce
// > SetupStaticCameraPopup::init @ 0x1404601ec
// > SetupStaticCameraPopup::init @ 0x14046027c
// > SetupTimerControlTriggerPopup::init @ 0x140463136
// > SetupTimerControlTriggerPopup::init @ 0x1404631b7
// > SelectEventLayer::addToggle @ 0x14046797d
// > UIObjectSettingsPopup::init @ 0x140469eef
// > UIObjectSettingsPopup::init @ 0x140469f84
// > UIObjectSettingsPopup::init @ 0x14046a007
// > UIObjectSettingsPopup::init @ 0x14046a09b
// > UIObjectSettingsPopup::init @ 0x14046a240
// > UIObjectSettingsPopup::init @ 0x14046a2d6
// > UIObjectSettingsPopup::init @ 0x14046a367
// > UIObjectSettingsPopup::init @ 0x14046a3fd
// > SetupItemEditTriggerPopup::init @ 0x14046afaf
// > SetupItemEditTriggerPopup::init @ 0x14046b043
// > SetupItemEditTriggerPopup::init @ 0x14046b0dd
// > SetupItemEditTriggerPopup::init @ 0x14046b16a
// > SetupItemEditTriggerPopup::init @ 0x14046b202
// > SetupItemEditTriggerPopup::init @ 0x14046b364
// > SetupItemEditTriggerPopup::init @ 0x14046b3f9
// > SetupItemEditTriggerPopup::init @ 0x14046b48b
// > SetupItemEditTriggerPopup::init @ 0x14046b511
// > SetupItemEditTriggerPopup::init @ 0x14046b5a2
// > SetupItemEditTriggerPopup::init @ 0x14046b7e9
// > SetupItemEditTriggerPopup::init @ 0x14046b87d
// > SetupItemEditTriggerPopup::init @ 0x14046b90e
// > SetupItemCompareTriggerPopup::init @ 0x14046d7d9
// > SetupItemCompareTriggerPopup::init @ 0x14046d86f
// > SetupItemCompareTriggerPopup::init @ 0x14046d906
// > SetupItemCompareTriggerPopup::init @ 0x14046d992
// > SetupItemCompareTriggerPopup::init @ 0x14046da27
// > SetupItemCompareTriggerPopup::init @ 0x14046dbb0
// > SetupItemCompareTriggerPopup::init @ 0x14046dc3d
// > SetupItemCompareTriggerPopup::init @ 0x14046dccb
// > SetupItemCompareTriggerPopup::init @ 0x14046dd4e
// > SetupItemCompareTriggerPopup::init @ 0x14046dddb
// > SetupStopTriggerPopup::init @ 0x140472b60
// > SetupStopTriggerPopup::init @ 0x140472bec
// > SetupStopTriggerPopup::init @ 0x140472c7e
// > ??> @ 0x1406db6fc
//
// 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
//
// Hidden C++ exception states: #wind=2
cocos2d::CCArray *__fastcall SetupTriggerPopup::createCustomToggleValueControl(
SetupTriggerPopup *a1,
int a2,
bool a3,
__int64 a4,
__int64 a5,
cocos2d::CCPoint a6,
char a7,
unsigned int a8,
int a9)
{
float v9; // xmm0_4
__int64 v11; // rcx
struct cocos2d::CCObject *v12; // rax
cocos2d::CCArray *GroupContainer; // r15
float v14; // xmm1_4
__int64 v15; // rcx
cocos2d::CCArray *v16; // rbp
const char *v17; // rdi
float *v18; // rax
float *v19; // rbx
struct cocos2d::CCPoint v20; // rax
CCMenuItemToggler *ToggleButton; // rbx
cocos2d::CCPoint v25[2]; // [rsp+88h] [rbp-A0h] BYREF
cocos2d::CCArray *v26; // [rsp+98h] [rbp-90h]
cocos2d::CCPoint v27[2]; // [rsp+A0h] [rbp-88h] BYREF
cocos2d::CCPoint v28; // [rsp+B0h] [rbp-78h] BYREF
_BYTE v29[32]; // [rsp+B8h] [rbp-70h] BYREF
__int64 v30; // [rsp+D8h] [rbp-50h]
v30 = a5;
v25[1] = a6;
while ( cocos2d::CCArray::count(a1->m_pageContainers) <= a8 )
{
v12 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v11);
cocos2d::CCArray::addObject(a1->m_pageContainers, v12);
}
v26 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, a8);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a9);
if ( a7 )
v14 = 0.0;
else
v14 = 8.0;
cocos2d::CCPoint::CCPoint(v9, v14);
cocos2d::CCPoint::CCPoint(v25);
v16 = (cocos2d::CCArray *)cocos2d::CCArray::create(v15);
v27[1] = (cocos2d::CCPoint)v29;
v17 = (const char *)sub_14003BDB0((__int64)v29, a5);
cocos2d::CCPoint::CCPoint(v27);
v19 = v18;
cocos2d::CCPoint::CCPoint(&v28);
ToggleButton = GameToolbox::createToggleButton(
v17,
(cocos2d::SEL_MenuHandler *)sub_14047DF68,
a3,
a1->m_buttonMenu,
v20,
a1,
a1->m_mainLayer,
0.69999999,
0.34999999,
110.0,
v19,
(const char *)&qword_14052A4D8,
a7,
0,
v16);
ToggleButton->setTag(ToggleButton, a2);
BYTE1(ToggleButton->m_onButton) = 1;
cocos2d::CCDictionary::setObject(a1->m_customValueToggles, ToggleButton, a2);
cocos2d::CCArray::addObjectsFromArray(v26, v16);
if ( a9 > 0 )
cocos2d::CCArray::addObjectsFromArray(GroupContainer, v16);
sub_14003A830(a5);
return v16;
}