//
// GridSettingsLayer::onBuildWindowContent from 0x78e828 to 0x78ecfe (1238 bytes)
//
// 0 xrefs:
//
// 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:59:39 +0000
//
int __fastcall GridSettingsLayer::onBuildWindowContent(GridSettingsLayer *this)
{
int v2; // r7
const cocos2d::CCPoint *v3; // r9
void (__fastcall *v4)(int, _DWORD *); // r6
float v5; // s20
float v6; // s19
float v7; // s19
int v8; // r6
void (__fastcall *v9)(int, _DWORD *); // r7
void (__fastcall *v10)(int, _DWORD *); // r7
cocos2d::CCDictionary *v11; // r0
cocos2d::CCDictionary *v12; // r0
Slider *v13; // r0
int v14; // r0
const cocos2d::CCPoint *v15; // r8
const char *v16; // r1
int v17; // r8
int v18; // r8
const char *v19; // r1
int v20; // r8
int v21; // r10
const char *v22; // r1
int v23; // r5
int v24; // r5
void (__fastcall *v25)(int, _BYTE *); // r10
void (__fastcall *v27)(int, _DWORD *); // [sp+10h] [bp-C4h]
void (__fastcall *v28)(int, _DWORD *); // [sp+10h] [bp-C4h]
float v29; // [sp+18h] [bp-BCh] BYREF
float v30; // [sp+1Ch] [bp-B8h]
_BYTE v31[8]; // [sp+20h] [bp-B4h] BYREF
_BYTE v32[8]; // [sp+28h] [bp-ACh] BYREF
_BYTE v33[8]; // [sp+30h] [bp-A4h] BYREF
EditorUI *(__fastcall *v34)(GridSettingsLayer *, cocos2d::CCObject *); // [sp+38h] [bp-9Ch]
int v35; // [sp+3Ch] [bp-98h]
_DWORD v36[2]; // [sp+40h] [bp-94h] BYREF
int v37[3]; // [sp+48h] [bp-8Ch] BYREF
_DWORD v38[4]; // [sp+54h] [bp-80h] BYREF
int v39; // [sp+64h] [bp-70h] BYREF
int v40; // [sp+68h] [bp-6Ch] BYREF
int v41; // [sp+6Ch] [bp-68h]
int v42; // [sp+70h] [bp-64h]
_BYTE v43[8]; // [sp+74h] [bp-60h] BYREF
int v44; // [sp+7Ch] [bp-58h]
char v45; // [sp+80h] [bp-54h]
int v46; // [sp+84h] [bp-50h]
int v47; // [sp+88h] [bp-4Ch]
char v48; // [sp+8Ch] [bp-48h]
float v49; // [sp+90h] [bp-44h]
int v50; // [sp+94h] [bp-40h]
int v51; // [sp+98h] [bp-3Ch]
int v52; // [sp+9Ch] [bp-38h]
int v53; // [sp+A0h] [bp-34h]
int v54; // [sp+A4h] [bp-30h]
char v55; // [sp+A8h] [bp-2Ch]
char v56; // [sp+A9h] [bp-2Bh]
int v57; // [sp+ACh] [bp-28h]
int v58[3]; // [sp+B0h] [bp-24h] BYREF
float v59; // [sp+BCh] [bp-18h]
int v60[3]; // [sp+C0h] [bp-14h] BYREF
EditorWindowPopup::contentCenter((EditorWindowPopup *)&v29);
v39 = 0;
v40 = 0;
v41 = 0;
std::string::__init(&v39, "Grid Size", 9u);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v39);
std::string::~string((int)&v39);
memset(v37, 0, sizeof(v37));
std::string::__init(v37, "Grid Size", 9u);
v39 = 0;
v40 = 0;
v41 = 0;
std::string::__init(
&v39,
"Enable to override the editor grid with a custom size.\n"
"Shift+G toggles it. Ctrl+G cycles the preset sizes\n"
"(7.5, 15, 30, 60, 120).",
0xA1u);
v2 = InfoAlertButton::create((char *)v37, (int)&v39, 1058642330);
std::string::~string((int)&v39);
std::string::~string((int)v37);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v2);
v3 = *((const cocos2d::CCPoint **)this + 111);
v4 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v2 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v36,
(float)(v29 + (float)(*((float *)this + 183) * 0.5)) - 13.0,
(float)(v30 + (float)(*((float *)this + 184) * 0.5)) - 13.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v38, v3);
v4(v2, v38);
v5 = v29;
v6 = v30;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v38, 0.0, 0.0, 40.0, 40.0);
v7 = v6 - 15.0;
v8 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v38);
v9 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v8 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v38, *((float *)this + 139) - 30.0, 64.0);
v9(v8, v38);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v8 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v5, v7 + 5.0);
v10(v8, v38);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v8 + 480))(v8, &unk_BF10B8);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v8 + 456))(v8, 50);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v8, -1);
v39 = 0;
v40 = 0;
v41 = 0;
std::string::__init(&v39, "Enabled", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v5 - 100.0, v7);
SetupTriggerPopup::createToggleValueControl((int)this, -1, (int)&v39, (const cocos2d::CCPoint *)v38, 1, 0, 0, 1.0);
std::string::~string((int)&v39);
v39 = 0;
v40 = 0;
v41 = 0;
v42 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, (const cocos2d::CCPoint *)&unk_D2E4A8);
v46 = 2;
v54 = 2;
v44 = 1065353216;
v47 = 6;
v57 = 1116471296;
v48 = 1;
v49 = 0.0;
v50 = 0;
v45 = 0;
v51 = 0;
v52 = 0;
v53 = 0;
v55 = 0;
v56 = 0;
memset(v58, 0, sizeof(v58));
std::string::__init(v58, "goldFont.fnt", 0xCu);
memset(v60, 0, sizeof(v60));
v59 = 0.0;
std::string::__init(v60, "Num", 3u);
v39 = -2;
std::string::assign(&v40, "Size:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v5 + 15.0, v7 + 5.0);
cocos2d::CCPoint::operator=(v43, v38);
v49 = 5.0;
v44 = 1058642330;
v45 = 0;
v48 = 1;
v56 = 1;
v46 = 1;
v54 = 1;
v47 = 5;
v59 = 0.55;
v50 = 1123024896;
SetupTriggerPopup::createValueControlAdvanced((cocos2d::CCDictionary **)this, (ValueControlSettings *)&v39);
SetupTriggerPopup::toggleLimitArrowValue((int **)this, -2, 1);
v11 = *((cocos2d::CCDictionary **)this + 145);
if ( v11 )
{
v13 = (Slider *)cocos2d::CCDictionary::objectForKey(v11, -2);
if ( v13 )
Slider::setSnapStepCalc(v13, 0.5, 5.0, 120.0);
}
v12 = *((cocos2d::CCDictionary **)this + 144);
if ( v12 )
{
v14 = cocos2d::CCDictionary::objectForKey(v12, -2);
if ( v14 )
{
v15 = *((const cocos2d::CCPoint **)this + 111);
(*(void (__fastcall **)(int))(*(_DWORD *)v14 + 96))(v14);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v31, v15);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn2_001.png", v16);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 80))(v17, 1060655596);
v34 = GridSettingsLayer::onCycleDown;
v35 = 0;
v18 = CCMenuItemSpriteExtra::create(v17, 0, (int)this, (int)GridSettingsLayer::onCycleDown, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v18);
v27 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, -64.8, 0.0);
cocos2d::CCPoint::operator+(v38, v31, v36);
v27(v18, v38);
CCMenuItemSpriteExtra::setSizeMult(v18, 2.0);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn2_001.png", v19);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 80))(v20, 1060655596);
v36[0] = GridSettingsLayer::onCycleUp;
v36[1] = 0;
v21 = CCMenuItemSpriteExtra::create(v20, 0, (int)this, (int)GridSettingsLayer::onCycleUp, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v21);
v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v21 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 64.8, 0.0);
cocos2d::CCPoint::operator+(v38, v31, v33);
v28(v21, v38);
CCMenuItemSpriteExtra::setSizeMult(v21, 2.0);
v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_trashBtn_001.png", v22);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 80))(v23, 1056964608);
v38[0] = GridSettingsLayer::onReset;
v38[1] = 0;
v24 = CCMenuItemSpriteExtra::create(v23, 0, (int)this, (int)GridSettingsLayer::onReset, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v24);
v25 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v24 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 96.8, 0.0);
cocos2d::CCPoint::operator+(v33, v31, v32);
v25(v24, v33);
}
}
std::string::~string((int)v60);
std::string::~string((int)v58);
return std::string::~string((int)&v40);
}