//
// SetupTriggerPopup::createValueControlAdvanced from 0x67a3c8 to 0x67abfa (2098 bytes)
//
// 12 xrefs:
// > CreateStartPosPopup::init @ 0x490526
// > SetupTriggerPopup::createValueControlAdvanced @ 0x67b478
// > StartPosLayer::init @ 0x6ad346
// > StartPosLayer::init @ 0x6ad43e
// > StartPosLayer::init @ 0x6ad4ce
// > StartPosLayer::init @ 0x6ad502
// > AutoSaveSettingsLayer::init @ 0x6e762e
// > AutoSaveSettingsLayer::init @ 0x6e78c2
// > GameSettingsLayer::addSpecialContent @ 0x711388
// > AutoBackupOptionsPopup::init @ 0x73e054
// > MoveStepPopup::onBuildWindowContent @ 0x744ebe
// > GridSettingsLayer::onBuildWindowContent @ 0x78eade
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:55:58 +0000
//
cocos2d::CCArray *__fastcall SetupTriggerPopup::createValueControlAdvanced(
cocos2d::CCDictionary **this,
ValueControlSettings *a2)
{
int v4; // r3
cocos2d::CCArray *v5; // r9
int GroupContainer; // r0
float v7; // s14
const char *v8; // r2
float v9; // s16
cocos2d::CCLabelBMFont *v10; // r0
int v11; // r3
const char *v12; // r1
cocos2d::CCObject *v13; // r0
float v14; // s15
cocos2d::CCObject *v15; // r6
_BYTE *v16; // r11
cocos2d::CCObject *v17; // r7
unsigned int v18; // r3
bool v19; // cc
char *v20; // r2
int *v21; // r6
int v22; // r0
int v23; // r2
int v24; // r11
float v25; // s14
cocos2d::CCObject *v26; // r0
cocos2d::CCObject *v27; // r7
float v28; // s15
int Thumb; // r0
const char *v30; // r1
const cocos2d::CCPoint *v31; // r7
float v32; // s15
float v33; // s16
const char *v34; // r1
int v35; // r6
cocos2d::CCObject *v36; // r6
const char *v37; // r1
int v38; // r6
cocos2d::CCObject *v39; // r6
int v40; // r6
cocos2d::CCObject *v41; // r6
const cocos2d::CCPoint *v42; // r11
signed int v43; // r2
const char *v45; // [sp+8h] [bp-94h]
cocos2d::CCArray *PageContainer; // [sp+Ch] [bp-90h]
cocos2d::CCArray *v47; // [sp+Ch] [bp-90h]
cocos2d::CCArray *v48; // [sp+10h] [bp-8Ch]
cocos2d::CCArray *v49; // [sp+10h] [bp-8Ch]
_BOOL4 v50; // [sp+14h] [bp-88h]
void (__fastcall *v51)(int *, int); // [sp+1Ch] [bp-80h]
void (__fastcall *v52)(cocos2d::CCObject *, _DWORD *); // [sp+1Ch] [bp-80h]
void (__fastcall *v53)(cocos2d::CCObject *, _DWORD *); // [sp+1Ch] [bp-80h]
int v54; // [sp+24h] [bp-78h]
_BYTE v55[8]; // [sp+28h] [bp-74h] BYREF
_BYTE v56[8]; // [sp+30h] [bp-6Ch] BYREF
_BYTE v57[8]; // [sp+38h] [bp-64h] BYREF
_BYTE v58[8]; // [sp+40h] [bp-5Ch] BYREF
_BYTE v59[8]; // [sp+48h] [bp-54h] BYREF
_BYTE v60[8]; // [sp+50h] [bp-4Ch] BYREF
_BYTE v61[8]; // [sp+58h] [bp-44h] BYREF
_DWORD (*v62)(SetupTriggerPopup *__hidden, cocos2d::CCObject *); // [sp+60h] [bp-3Ch]
int v63; // [sp+64h] [bp-38h]
_DWORD (*v64)(SetupTriggerPopup *__hidden, cocos2d::CCObject *); // [sp+68h] [bp-34h]
int v65; // [sp+6Ch] [bp-30h]
_DWORD v66[2]; // [sp+70h] [bp-2Ch] BYREF
int v67[3]; // [sp+78h] [bp-24h] BYREF
_DWORD v68[4]; // [sp+84h] [bp-18h] BYREF
if ( (unsigned int)(*((_DWORD *)a2 + 8) - 2) <= 1 )
{
v4 = 0;
}
else
{
v4 = *((_DWORD *)a2 + 16);
if ( v4 >= 4 )
v4 = 4;
}
*((_DWORD *)a2 + 16) = v4;
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)this);
PageContainer = (cocos2d::CCArray *)SetupTriggerPopup::getPageContainer(this, *((_DWORD *)a2 + 13));
GroupContainer = SetupTriggerPopup::getGroupContainer(this, *((_DWORD *)a2 + 14));
v7 = *((float *)a2 + 6);
v48 = (cocos2d::CCArray *)GroupContainer;
v50 = *((_DWORD *)a2 + 15) == 1;
if ( *((_DWORD *)a2 + 15) == 1 )
*((float *)a2 + 4) = *((float *)a2 + 4) - (float)(v7 * 70.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, (float)((float)(*((float *)a2 + 18) * 0.5) + 10.0) * v7, 0.0);
cocos2d::CCPoint::operator+(v55, (char *)a2 + 16, v68);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, (ValueControlSettings *)((char *)a2 + 16));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, 1.0, 0.5);
if ( *((_BYTE *)a2 + 40) )
{
if ( v50 && !*((_BYTE *)a2 + 69) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, *((float *)a2 + 6) * 128.0, 0.0);
cocos2d::CCPoint::operator+(v68, (char *)a2 + 16, v66);
cocos2d::CCPoint::operator=(v56, v68);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, 0.0, 0.5);
goto LABEL_15;
}
LABEL_13:
cocos2d::CCPoint::operator=(v55, (char *)a2 + 16);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, 0.0, *((float *)a2 + 6) * 25.0);
cocos2d::CCPoint::operator+(v68, (char *)a2 + 16, v66);
cocos2d::CCPoint::operator=(v56, v68);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, 0.5, 0.0);
LABEL_15:
cocos2d::CCPoint::operator=(v57, v68);
goto LABEL_16;
}
v8 = (const char *)*((unsigned __int8 *)a2 + 69);
if ( *((_BYTE *)a2 + 69) )
goto LABEL_13;
LABEL_16:
v9 = *((float *)a2 + 22);
if ( v9 <= 0.0 )
v9 = *((float *)a2 + 6);
if ( (*((_BYTE *)a2 + 4) & 1) != 0 )
v10 = *((cocos2d::CCLabelBMFont **)a2 + 3);
else
v10 = (ValueControlSettings *)((char *)a2 + 5);
if ( v50 )
{
v12 = "chatFont.fnt";
}
else
{
v11 = *((unsigned __int8 *)a2 + 76);
v8 = (const char *)(v11 << 31);
if ( (v11 & 1) != 0 )
v12 = *((const char **)a2 + 21);
else
v12 = (char *)a2 + 77;
}
v13 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v10, v12, v8);
v14 = 1.0;
if ( !v50 )
v14 = 0.7;
v15 = v13;
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v13 + 80))(v13, v14 * v9);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v15 + 92))(v15, v56);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v15 + 148))(v15, v57);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v15);
cocos2d::CCArray::addObject(PageContainer, v15);
if ( *((int *)a2 + 14) > 0 )
cocos2d::CCArray::addObject(v48, v15);
cocos2d::CCArray::addObject(v5, v15);
v16 = v58;
cocos2d::CCDictionary::setObject(*(this + 153), v15, *(_DWORD *)a2);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v68, 0.0, 0.0, 40.0, 40.0);
v17 = (cocos2d::CCObject *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v68);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v17 + 456))(v17, 100);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v58, *((float *)a2 + 18), 30.0);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v17 + 160))(v17, v58);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v17, -1);
cocos2d::CCArray::addObject(PageContainer, v17);
if ( *((int *)a2 + 14) > 0 )
cocos2d::CCArray::addObject(v48, v17);
cocos2d::CCArray::addObject(v5, v17);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v17 + 92))(v17, v55);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v17 + 80))(v17, *((_DWORD *)a2 + 6));
v18 = *((_DWORD *)a2 + 8) - 2;
v19 = v18 > 1;
if ( v18 <= 1 )
v16 = nullptr;
else
v18 = *((_DWORD *)a2 + 16);
if ( v19 )
v16 = (_BYTE *)(v18 + 1);
if ( (*((_BYTE *)a2 + 92) & 1) != 0 )
v20 = *((char **)a2 + 25);
else
v20 = (char *)a2 + 93;
v21 = CCTextInputNode::create(
COERCE_CCTEXTINPUTNODE_((float)(*((float *)a2 + 18) - 10.0) * *((float *)a2 + 6)),
*((float *)a2 + 6) * 40.0,
v20,
"Thonburi",
(const char *)&dword_18,
"bigFont.fnt",
v45);
(*(void (__fastcall **)(_DWORD, int *, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v21, 20);
cocos2d::CCArray::addObject(PageContainer, (cocos2d::CCObject *)v21);
if ( *((int *)a2 + 14) > 0 )
cocos2d::CCArray::addObject(v48, (cocos2d::CCObject *)v21);
cocos2d::CCArray::addObject(v5, (cocos2d::CCObject *)v21);
v51 = *(void (__fastcall **)(int *, int))(*v21 + 92);
v22 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v17 + 96))(v17);
v51(v21, v22);
CCTextInputNode::setMaxLabelScale((unsigned int)v21, *((float *)a2 + 6) * 0.6);
CCTextInputNode::setMaxLabelWidth((unsigned int)v21, (float)(*((float *)a2 + 18) - 20.0) * *((float *)a2 + 6));
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v21[104] + 172))(v21[104], 0);
v21[106] = (int)&v16[*((_DWORD *)a2 + 9)];
v21[126] = *((_DWORD *)a2 + 8);
v21[127] = *((_DWORD *)a2 + 16);
v23 = *((_DWORD *)a2 + 8);
memset(v67, 0, sizeof(v67));
if ( v23 == 3 )
{
std::string::__init(v67, "0123456789", 0xAu);
CCTextInputNode::setAllowedChars((int)v21, (unsigned __int8 *)v67);
}
else if ( v23 == 4 )
{
std::string::__init(
v67,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~",
0x61u);
CCTextInputNode::setAllowedChars((int)v21, (unsigned __int8 *)v67);
}
else
{
if ( v23 == 2 )
std::string::__init(v67, "0123456789-", 0xBu);
else
std::string::__init(v67, "0123456789-.", 0xCu);
CCTextInputNode::setAllowedChars((int)v21, (unsigned __int8 *)v67);
}
std::string::~string((int)v67);
LOWORD(v54) = -21896;
BYTE2(v54) = -16;
CCTextInputNode::setLabelPlaceholderColor((unsigned int)v21, v54);
CCTextInputNode::setLabelPlaceholderScale((unsigned int)v21, 0.4);
*((_BYTE *)v21 + 324) = *((_DWORD *)a2 + 8) != 4;
v21[105] = (int)(this + 110);
(*(void (__fastcall **)(int *, _DWORD))(*v21 + 36))(v21, *(_DWORD *)a2);
cocos2d::CCDictionary::setObject(*(this + 144), (cocos2d::CCObject *)v21, *(_DWORD *)a2);
v24 = *((unsigned __int8 *)a2 + 28);
if ( !*((_BYTE *)a2 + 28) )
{
v25 = *((float *)a2 + 6);
v63 = *((unsigned __int8 *)a2 + 28);
v62 = SetupTriggerPopup::triggerSliderChanged;
v26 = (cocos2d::CCObject *)Slider::create((int)this, (int)SetupTriggerPopup::triggerSliderChanged, v24, v25 * 0.8);
*((_DWORD *)v26 + 84) = this + 131;
v27 = v26;
Slider::setBarVisibility(v26, v24);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v27);
cocos2d::CCArray::addObject(PageContainer, v27);
if ( *((int *)a2 + 14) > 0 )
cocos2d::CCArray::addObject(v48, v27);
cocos2d::CCArray::addObject(v5, v27);
v28 = *((float *)a2 + 6);
v52 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v27 + 92);
if ( v50 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v28 * 145.0, 0.0);
cocos2d::CCPoint::operator+(v68, (char *)a2 + 16, v66);
v52(v27, v68);
Slider::setMaxOffset((SliderTouchLogic **)v27, 100.0);
(*(void (__fastcall **)(_DWORD *, int))(**((_DWORD **)v27 + 81) + 64))(*((_DWORD **)v27 + 81), 1050253722);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, 0.0, v28 * -32.0);
cocos2d::CCPoint::operator+(v68, (char *)a2 + 16, v66);
v52(v27, v68);
}
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v27 + 36))(v27, *(_DWORD *)a2);
Thumb = Slider::getThumb(v27);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)Thumb + 36))(Thumb, *(_DWORD *)a2);
cocos2d::CCDictionary::setObject(*(this + 145), v27, *(_DWORD *)a2);
}
SetupTriggerPopup::setMinSliderValue((SetupTriggerPopup *)this, *((cocos2d::CCFloat **)a2 + 11), *(_DWORD *)a2);
if ( *((float *)a2 + 12) != 0.0 )
SetupTriggerPopup::setMaxSliderValue((SetupTriggerPopup *)this, *((cocos2d::CCFloat **)a2 + 12), *(_DWORD *)a2);
if ( *((_BYTE *)a2 + 40) )
{
v31 = *(this + 111);
(*(void (__fastcall **)(int *))(*v21 + 96))(v21);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v60, v31);
v32 = *((float *)a2 + 6);
v33 = (float)(v32 * 50.0) * 1.2;
v35 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn_001.png", v34);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v35 + 80))(v35, v32 * 1.2);
v65 = 0;
v64 = SetupTriggerPopup::triggerArrowLeft;
v36 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v35,
0,
(int)this,
(int)SetupTriggerPopup::triggerArrowLeft,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v36);
cocos2d::CCArray::addObject(PageContainer, v36);
if ( *((int *)a2 + 14) > 0 )
cocos2d::CCArray::addObject(v48, v36);
cocos2d::CCArray::addObject(v5, v36);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v36 + 36))(v36, *(_DWORD *)a2);
v53 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v36 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, -v33, 0.0);
cocos2d::CCPoint::operator+(v68, v60, v66);
v53(v36, v68);
CCMenuItemSpriteExtra::setSizeMult((int)v36, 2.0);
v38 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn_001.png", v37);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v38 + 80))(v38, v32 * 1.2);
v66[1] = 0;
v66[0] = SetupTriggerPopup::triggerArrowRight;
v39 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v38,
0,
(int)this,
(int)SetupTriggerPopup::triggerArrowRight,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v39);
cocos2d::CCArray::addObject(PageContainer, v39);
if ( *((int *)a2 + 14) > 0 )
cocos2d::CCArray::addObject(v48, v39);
cocos2d::CCArray::addObject(v5, v39);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v39 + 36))(v39, *(_DWORD *)a2);
v49 = *(cocos2d::CCArray **)(*(_DWORD *)v39 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, v33, 0.0);
cocos2d::CCPoint::operator+(v68, v60, v61);
((void (__fastcall *)(cocos2d::CCObject *, _DWORD *))v49)(v39, v68);
CCMenuItemSpriteExtra::setSizeMult((int)v39, 2.0);
}
if ( *((_BYTE *)a2 + 68) )
{
v40 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_resetBtn_001.png", v30);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v40 + 80))(v40, *((_DWORD *)a2 + 6));
v68[1] = 0;
v68[0] = SetupTriggerPopup::onDisableValue;
v41 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v40,
0,
(int)this,
(int)SetupTriggerPopup::onDisableValue,
0);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v41 + 36))(v41, *(_DWORD *)a2);
cocos2d::CCDictionary::setObject(*(this + 147), v41, *(_DWORD *)a2);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v41);
v42 = *(this + 111);
v47 = *(cocos2d::CCArray **)(*(_DWORD *)v41 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, *((float *)a2 + 6) * 230.0, 0.0);
cocos2d::CCPoint::operator+(v60, (char *)a2 + 16, v59);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v61, v42);
((void (__fastcall *)(cocos2d::CCObject *, _BYTE *))v47)(v41, v61);
SetupTriggerPopup::addObjectToPage(this, v41, *((_DWORD *)a2 + 13));
v43 = *((_DWORD *)a2 + 14);
if ( v43 > 0 )
SetupTriggerPopup::addObjectToGroup(this, v41, v43);
}
return v5;
}