//
// SetupTriggerPopup::createToggleValueControlAdvanced from 0x14060e5b0 to 0x14060e7d1 (545 bytes)
//
// 3 xrefs:
// > GameSettingsLayer::addToggle @ 0x1402c6a31
// > SetupTriggerPopup::createToggleValueControl @ 0x14060e561
// > ??> @ 0x14092fec4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:35:15 +0000
//
// Hidden C++ exception states: #wind=2
cocos2d::CCArray *__fastcall SetupTriggerPopup::createToggleValueControlAdvanced(
__int64 a1,
unsigned int a2,
__int64 a3,
const struct cocos2d::CCPoint *a4,
char a5,
unsigned int a6,
signed int a7,
float a8,
float a9,
float a10,
const struct cocos2d::CCPoint *a11)
{
struct cocos2d::CCObject *PageContainer; // r12
__int64 v15; // rcx
const char *v16; // rbp
__int64 v17; // rdi
__int64 v18; // rsi
float *v19; // rax
float *v20; // rbx
__int64 v21; // rax
struct cocos2d::CCObject *ToggleButton; // rbx
cocos2d::CCArray *v25; // [rsp+88h] [rbp-E0h]
struct cocos2d::CCObject *GroupContainer; // [rsp+98h] [rbp-D0h]
_BYTE v29[8]; // [rsp+B0h] [rbp-B8h] BYREF
_BYTE v30[8]; // [rsp+B8h] [rbp-B0h] BYREF
_BYTE v31[32]; // [rsp+C0h] [rbp-A8h] BYREF
__int64 v32; // [rsp+E0h] [rbp-88h]
v32 = a3;
PageContainer = SetupTriggerPopup::getPageContainer(a1, a6);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a7);
v25 = (cocos2d::CCArray *)cocos2d::CCArray::create(v15);
v16 = (const char *)sub_14003F4F0((__int64)v31, a3);
v17 = *(_QWORD *)(a1 + 584);
v18 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, a11);
v20 = v19;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, a4);
ToggleButton = GameToolbox::createToggleButton(
v16,
(__int64)SetupTriggerPopup::onToggleTriggerValue,
0,
v18,
v21,
a1,
v17,
a8,
a9,
a10,
v20,
(const char *)&qword_140704F78,
a5,
0,
v25);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)ToggleButton + 64LL))(ToggleButton, a2);
*((_BYTE *)ToggleButton + 393) = 1;
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 752), ToggleButton, (int)a2);
cocos2d::CCArray::addObjectsFromArray(PageContainer, v25);
if ( a7 > 0 )
cocos2d::CCArray::addObjectsFromArray(GroupContainer, v25);
sub_14003D310(a3);
return v25;
}