//
// SetupTriggerPopup::createToggleValueControl from 0x140476ca0 to 0x140476fa2 (770 bytes)
//
// 245 xrefs:
// > SetupMoveCommandPopup::init @ 0x140281062
// > SetupMoveCommandPopup::init @ 0x1402810f1
// > SetupMoveCommandPopup::init @ 0x140281200
// > SetupMoveCommandPopup::init @ 0x140281294
// > SetupMoveCommandPopup::init @ 0x1402814d6
// > SetupMoveCommandPopup::init @ 0x140281559
// > SetupMoveCommandPopup::init @ 0x140281845
// > SetupMoveCommandPopup::init @ 0x1402818d7
// > SetupMoveCommandPopup::init @ 0x140281965
// > SetupMoveCommandPopup::init @ 0x1402819ed
// > SetupMoveCommandPopup::init @ 0x140281c7c
// > EditGameObjectPopup::init @ 0x14029b13a
// > UIOptionsLayer::init @ 0x1402a1679
// > UIOptionsLayer::init @ 0x1402a1bec
// > UIOptionsLayer::init @ 0x1402a1c73
// > UIOptionsLayer::init @ 0x1402a1cfe
// > UIOptionsLayer::init @ 0x1402a1d90
// > UIOptionsLayer::init @ 0x1402a295b
// > UIOptionsLayer::init @ 0x1402a29d9
// > UIOptionsLayer::init @ 0x1402a2a64
// > SetupRotateCommandPopup::init @ 0x1402a83ec
// > SetupRotateCommandPopup::init @ 0x1402a846d
// > SetupRotateCommandPopup::init @ 0x1402a84f8
// > SetupRotateCommandPopup::init @ 0x1402a858f
// > SetupRotateCommandPopup::init @ 0x1402a8619
// > SetupRotateCommandPopup::init @ 0x1402a86bb
// > SetItemIDLayer::init @ 0x1404014f4
// > SetItemIDLayer::init @ 0x14040157f
// > SetupAdvFollowPopup::init @ 0x140402903
// > SetupAdvFollowPopup::init @ 0x140402971
// > SetupAdvFollowPopup::init @ 0x1404029df
// > SetupAdvFollowPopup::init @ 0x140402a4d
// > SetupAdvFollowPopup::init @ 0x140402ab6
// > SetupAdvFollowPopup::init @ 0x140402bce
// > SetupAdvFollowPopup::init @ 0x140402c38
// > SetupAdvFollowPopup::init @ 0x140402f3d
// > SetupAdvFollowPopup::init @ 0x140403f20
// > SetupAdvFollowPopup::init @ 0x140404265
// > SetupAdvFollowPopup::init @ 0x140404d8b
// > SetupAdvFollowEditPhysicsPopup::init @ 0x140407722
// > SetupAdvFollowEditPhysicsPopup::init @ 0x1404077a9
// > SetupAdvFollowEditPhysicsPopup::init @ 0x140407fcf
// > SetupAdvFollowEditPhysicsPopup::init @ 0x14040805f
// > SetupAdvFollowRetargetPopup::init @ 0x140408702
// > SetupAdvFollowRetargetPopup::init @ 0x14040877e
// > SetupAdvFollowRetargetPopup::init @ 0x1404087f3
// > SetupAdvFollowRetargetPopup::init @ 0x140408898
// > SetupAnimSettingsPopup::init @ 0x14040a5a2
// > SetupAnimSettingsPopup::init @ 0x14040a627
// > SetupAnimSettingsPopup::init @ 0x14040a6c9
// > SetupAnimSettingsPopup::init @ 0x14040a764
// > SetupAnimSettingsPopup::init @ 0x14040a800
// > SetupAnimSettingsPopup::init @ 0x14040a88f
// > SetupAnimSettingsPopup::init @ 0x14040aac9
// > SetupAreaMoveTriggerPopup::init @ 0x14040be1b
// > SetupAreaMoveTriggerPopup::init @ 0x14040bf70
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040cef4
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040cf70
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040cffb
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040d14e
// > SetupAreaTintTriggerPopup::init @ 0x140410133
// > SetupAreaTintTriggerPopup::init @ 0x1404101c2
// > SetupAreaTintTriggerPopup::init @ 0x140410245
// > SetupAreaAnimTriggerPopup::init @ 0x1404118d4
// > SetupAreaAnimTriggerPopup::init @ 0x140411ada
// > SetupAreaAnimTriggerPopup::init @ 0x14041221a
// > SetupCameraModePopup::init @ 0x140414796
// > SetupCameraRotatePopup2::init @ 0x140417e96
// > SetupCameraRotatePopup2::init @ 0x140417f25
// > SetupInstantCollisionTriggerPopup::init @ 0x14041a506
// > SetupInstantCollisionTriggerPopup::init @ 0x14041a57a
// > SetupInstantCollisionTriggerPopup::init @ 0x14041a5f1
// > SetupPlatformerEndPopup::init @ 0x14041dfe4
// > SetupPlatformerEndPopup::init @ 0x14041e06b
// > SetupPlatformerEndPopup::init @ 0x14041e0fa
// > SetupEnterEffectPopup::init @ 0x14041ebc6
// > SetupEnterEffectPopup::init @ 0x14041f826
// > SetupEnterEffectPopup::init @ 0x14041f8a8
// > SetupEnterEffectPopup::init @ 0x14041f930
// > SetupGradientPopup::init @ 0x140421238
// > SetupGradientPopup::init @ 0x1404212dd
// > SetupGradientPopup::init @ 0x140421377
// > SetupInteractObjectPopup::init @ 0x140423d99
// > SetupInteractObjectPopup::init @ 0x140423ecf
// > SetupInteractObjectPopup::init @ 0x140423fdb
// > SetupInteractObjectPopup::init @ 0x1404240f2
// > SetupInteractObjectPopup::init @ 0x1404242e6
// > SetupKeyframePopup::init @ 0x14042578a
// > SetupKeyframePopup::init @ 0x140425d7a
// > SetupKeyframePopup::init @ 0x140425e22
// > SetupKeyframePopup::init @ 0x140425ec9
// > SetupKeyframePopup::init @ 0x140425f5f
// > SetupKeyframePopup::init @ 0x140425fff
// > SetupGravityTriggerPopup::init @ 0x140429599
// > SetupGravityTriggerPopup::init @ 0x140429614
// > SetupGravityTriggerPopup::init @ 0x140429694
// > SetupObjectTogglePopup::init @ 0x14042a13c
// > SetupObjectTogglePopup::init @ 0x14042a1c7
// > SetupObjectTogglePopup::init @ 0x14042a27d
// > SetupObjectTogglePopup::init @ 0x14042a319
// > SetupPickupTriggerPopup::init @ 0x140437117
// > SetupRotateGameplayPopup::init @ 0x140441841
// > SetupRotateGameplayPopup::init @ 0x1404418e6
// > SetupRotateGameplayPopup::init @ 0x140441b0b
// > SetupRotateGameplayPopup::init @ 0x140441b98
// > SetupRotateGameplayPopup::init @ 0x140441e0b
// > SetupRotateGameplayPopup::init @ 0x140441ec6
// > SetupGameplayOffsetPopup::init @ 0x1404425b7
// > SetupGameplayOffsetPopup::init @ 0x14044263a
// > SetupSequenceTriggerPopup::init @ 0x140444571
// > SetupAudioTriggerPopup::addProxVolControls @ 0x140445e3a
// > SetupAudioTriggerPopup::addProxVolControls @ 0x140445eb8
// > SetupAudioTriggerPopup::addProxVolControls @ 0x140445f3f
// > SetupReverbPopup::init @ 0x140446adf
// > SetupSFXPopup::init @ 0x140447851
// > SetupSFXPopup::init @ 0x1404478e2
// > SetupSFXPopup::init @ 0x14044796a
// > SetupSFXPopup::init @ 0x1404479ec
// > SetupSFXPopup::init @ 0x140447c25
// > SetupSFXPopup::init @ 0x140447d7d
// > SetupSFXPopup::init @ 0x140447e33
// > SetupSFXPopup::init @ 0x140448344
// > SetupSFXEditPopup::init @ 0x140449efd
// > SetupSFXEditPopup::init @ 0x140449f8e
// > SetupSFXEditPopup::init @ 0x14044a019
// > SetupSFXEditPopup::init @ 0x14044a0a8
// > SetupShaderEffectPopup::init @ 0x14044a524
// > SetupShaderEffectPopup::setupShaderTrigger @ 0x14044a8fd
// > SetupShaderEffectPopup::setupShaderTrigger @ 0x14044a9a7
// > SetupShaderEffectPopup::setupShockWave @ 0x14044bbb2
// > SetupShaderEffectPopup::setupShockWave @ 0x14044bc36
// > SetupShaderEffectPopup::setupShockWave @ 0x14044bcb4
// > SetupShaderEffectPopup::setupShockWave @ 0x14044bd7f
// > SetupShaderEffectPopup::setupShockWave @ 0x14044c081
// > SetupShaderEffectPopup::setupShockWave @ 0x14044c104
// > SetupShaderEffectPopup::setupShockWave @ 0x14044c192
// > SetupShaderEffectPopup::setupShockLine @ 0x14044ceaf
// > SetupShaderEffectPopup::setupShockLine @ 0x14044cf2c
// > SetupShaderEffectPopup::setupShockLine @ 0x14044cfb6
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d033
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d0bd
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d141
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d20a
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d43c
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d4bc
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d547
// > SetupShaderEffectPopup::setupGlitch @ 0x14044dd9e
// > SetupShaderEffectPopup::setupChromatic @ 0x14044e1b1
// > SetupShaderEffectPopup::setupChromatic @ 0x14044e237
// > SetupShaderEffectPopup::setupChromatic @ 0x14044e2e8
// > SetupShaderEffectPopup::setupChromaticGlitch @ 0x14044ea2d
// > SetupShaderEffectPopup::setupChromaticGlitch @ 0x14044eac0
// > SetupShaderEffectPopup::setupChromaticGlitch @ 0x14044eb77
// > SetupShaderEffectPopup::setupPixelate @ 0x14044efdd
// > SetupShaderEffectPopup::setupPixelate @ 0x14044f063
// > SetupShaderEffectPopup::setupPixelate @ 0x14044f0f5
// > SetupShaderEffectPopup::setupPixelate @ 0x14044f17b
// > SetupShaderEffectPopup::setupPixelate @ 0x14044f22c
// > SetupShaderEffectPopup::setupLensCircle @ 0x14044f982
// > SetupShaderEffectPopup::setupLensCircle @ 0x14044fa02
// > SetupShaderEffectPopup::setupLensCircle @ 0x14044fb78
// > SetupShaderEffectPopup::setupRadialBlur @ 0x14045018c
// > SetupShaderEffectPopup::setupRadialBlur @ 0x140450219
// > SetupShaderEffectPopup::setupRadialBlur @ 0x1404504de
// > SetupShaderEffectPopup::setupRadialBlur @ 0x14045055e
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140450a29
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140450ab2
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140450dca
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140450f0c
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140450f88
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140450ffd
// > SetupShaderEffectPopup::setupMotionBlur @ 0x140451093
// > SetupShaderEffectPopup::setupMotionBlur @ 0x14045111c
// > SetupShaderEffectPopup::setupBulge @ 0x1404515cd
// > SetupShaderEffectPopup::setupBulge @ 0x140451658
// > SetupShaderEffectPopup::setupBulge @ 0x14045192c
// > SetupShaderEffectPopup::setupBulge @ 0x1404519ac
// > SetupShaderEffectPopup::setupPinch @ 0x140451e78
// > SetupShaderEffectPopup::setupPinch @ 0x140451f04
// > SetupShaderEffectPopup::setupPinch @ 0x140452167
// > SetupShaderEffectPopup::setupPinch @ 0x14045221d
// > SetupShaderEffectPopup::setupPinch @ 0x140452505
// > SetupShaderEffectPopup::setupPinch @ 0x14045258b
// > SetupShaderEffectPopup::setupGrayscale @ 0x1404529be
// > SetupShaderEffectPopup::setupGrayscale @ 0x140452a38
// > SetupShaderEffectPopup::setupInvertColor @ 0x140453390
// > SetupShaderEffectPopup::setupInvertColor @ 0x140453411
// > SetupShaderEffectPopup::setupInvertColor @ 0x140453492
// > SetupShaderEffectPopup::setupSplitScreen @ 0x1404544d2
// > SetupShaderEffectPopup::setupSplitScreen @ 0x140454558
// > SetupSongTriggerPopup::init @ 0x14045cc23
// > SetupSongTriggerPopup::init @ 0x14045ccd1
// > SetupSongTriggerPopup::init @ 0x14045d068
// > SetupSongTriggerPopup::init @ 0x14045d0f5
// > SetupSpawnPopup::init @ 0x14045e61e
// > SetupSpawnPopup::init @ 0x14045e6af
// > SetupSpawnPopup::init @ 0x14045e746
// > SetupStaticCameraPopup::init @ 0x14045ffc3
// > SetupStaticCameraPopup::init @ 0x14046006b
// > SetupStaticCameraPopup::init @ 0x14046030b
// > SetupStaticCameraPopup::init @ 0x14046047c
// > SetupTeleportPopup::init @ 0x140460dbc
// > SetupTeleportPopup::init @ 0x140460e4b
// > SetupTeleportPopup::init @ 0x140460ec9
// > SetupTeleportPopup::init @ 0x140460f47
// > SetupTeleportPopup::init @ 0x140460fd3
// > SetupTeleportPopup::init @ 0x140461062
// > SetupTeleportPopup::init @ 0x1404610f0
// > SetupTeleportPopup::init @ 0x140461210
// > SetupTeleportPopup::init @ 0x140461615
// > SetupTeleportPopup::init @ 0x1404616a2
// > SetupTeleportPopup::init @ 0x140461817
// > SetupTimerTriggerPopup::init @ 0x140462244
// > SetupTimerTriggerPopup::init @ 0x140462539
// > SetupTimerTriggerPopup::init @ 0x1404625c5
// > SetupTimerTriggerPopup::init @ 0x140462655
// > SetupTimerEventTriggerPopup::init @ 0x140462cb4
// > SetupTransformPopup::init @ 0x140465367
// > SetupTransformPopup::init @ 0x14046559d
// > SetupTransformPopup::init @ 0x140465630
// > SetupTransformPopup::init @ 0x140465984
// > SetupTransformPopup::init @ 0x140465a48
// > SetupPlayerControlPopup::init @ 0x140468062
// > SetupPlayerControlPopup::init @ 0x1404680e3
// > SetupPlayerControlPopup::init @ 0x14046816e
// > SetupPlayerControlPopup::init @ 0x1404681f4
// > SetupPlayerControlPopup::init @ 0x140468276
// > SetupPlayerControlPopup::init @ 0x140468306
// > SetupSpawnParticlePopup::init @ 0x140468f24
// > SetupCheckpointPopup::init @ 0x1404694a3
// > MultiTriggerPopup::init @ 0x14046983f
// > UIObjectSettingsPopup::init @ 0x14046a121
// > UIObjectSettingsPopup::init @ 0x14046a479
// > SetupPersistentItemTriggerPopup::init @ 0x14046fdab
// > SetupPersistentItemTriggerPopup::init @ 0x14046fe5a
// > SetupPersistentItemTriggerPopup::init @ 0x14046fedf
// > SetupPersistentItemTriggerPopup::init @ 0x14046ff65
// > SetupAudioLineGuidePopup::init @ 0x1404704c5
// > SetupForceBlockPopup::init @ 0x14047151e
// > SetupForceBlockPopup::init @ 0x1404715aa
// > SetupStopTriggerPopup::init @ 0x140472aae
// > SetupDashRingPopup::init @ 0x1404736e1
// > SetupDashRingPopup::init @ 0x14047376f
// > SetupDashRingPopup::init @ 0x140473834
// > ??> @ 0x1406db6f0
//
// 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=4
cocos2d::CCArray *__fastcall SetupTriggerPopup::createToggleValueControl(
SetupTriggerPopup *a1,
int a2,
__int64 a3,
__int64 a4,
char a5,
unsigned int a6,
int a7,
float a8)
{
float v8; // xmm0_4
float v11; // xmm1_4
__int64 v12; // r12
__int64 v13; // rcx
struct cocos2d::CCObject *v14; // rax
cocos2d::CCArray *v15; // rsi
__int64 v16; // rcx
cocos2d::CCArray *v17; // r15
const char *v18; // rdi
float *v19; // rax
float *v20; // rbx
struct cocos2d::CCPoint v21; // rax
CCMenuItemToggler *ToggleButton; // rbx
cocos2d::CCArray *GroupContainer; // [rsp+88h] [rbp-110h]
cocos2d::CCPoint v26; // [rsp+98h] [rbp-100h] BYREF
_BYTE v27[8]; // [rsp+A0h] [rbp-F8h] BYREF
__int64 v28; // [rsp+A8h] [rbp-F0h]
cocos2d::CCPoint v29[2]; // [rsp+B0h] [rbp-E8h] BYREF
cocos2d::CCPoint v30; // [rsp+C0h] [rbp-D8h] BYREF
cocos2d::CCPoint v31; // [rsp+C8h] [rbp-D0h] BYREF
_BYTE v32[32]; // [rsp+D0h] [rbp-C8h] BYREF
_BYTE v33[32]; // [rsp+F0h] [rbp-A8h] BYREF
__int64 v34; // [rsp+110h] [rbp-88h]
v34 = a3;
if ( a5 )
v11 = 0.0;
else
v11 = 8.0;
cocos2d::CCPoint::CCPoint(v8, v11);
cocos2d::CCPoint::CCPoint(&v26);
v12 = sub_14003BDB0((__int64)v32, a3);
v28 = v12;
cocos2d::CCPoint::operator*(&v26, v27);
cocos2d::CCPoint::CCPoint(v29);
while ( cocos2d::CCArray::count(a1->m_pageContainers) <= a6 )
{
v14 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v13);
cocos2d::CCArray::addObject(a1->m_pageContainers, v14);
}
v15 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, a6);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a7);
v17 = (cocos2d::CCArray *)cocos2d::CCArray::create(v16);
v29[1] = (cocos2d::CCPoint)v33;
v18 = (const char *)sub_14003BDB0((__int64)v33, v12);
cocos2d::CCPoint::CCPoint(&v30);
v20 = v19;
cocos2d::CCPoint::CCPoint(&v31);
ToggleButton = GameToolbox::createToggleButton(
v18,
(cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onToggleTriggerValue,
0,
a1->m_buttonMenu,
v21,
a1,
a1->m_mainLayer,
a8 * 0.69999999,
a8 * 0.34999999,
a8 * 110.0,
v20,
(const char *)&qword_14052A4D8,
a5,
0,
v17);
ToggleButton->setTag(ToggleButton, a2);
BYTE1(ToggleButton->m_onButton) = 1;
cocos2d::CCDictionary::setObject(a1->m_valueToggles, ToggleButton, a2);
cocos2d::CCArray::addObjectsFromArray(v15, v17);
if ( a7 > 0 )
cocos2d::CCArray::addObjectsFromArray(GroupContainer, v17);
sub_14003A830(v12);
sub_14003A830(a3);
return v17;
}