//
// GJAccountSettingsLayer::createToggleButton from 0x5d488c to 0x5d49ca (318 bytes)
//
// 12 xrefs:
// > GJAccountSettingsLayer::init @ 0x5e356c
// > GJAccountSettingsLayer::init @ 0x5e3664
// > GJAccountSettingsLayer::init @ 0x5e36e8
// > GJAccountSettingsLayer::init @ 0x5e38e4
// > GJAccountSettingsLayer::init @ 0x5e395c
// > GJAccountSettingsLayer::init @ 0x5e3a16
// > GJAccountSettingsLayer::init @ 0x5e3c2c
// > GJAccountSettingsLayer::init @ 0x5e3cb2
// > GJAccountSettingsLayer::init @ 0x5e3d86
// > GJAccountSettingsLayer::init @ 0x5e3eea
// > GJAccountSettingsLayer::init @ 0x5e3f5c
// > GJAccountSettingsLayer::init @ 0x5e3fcc
//
// 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:54:07 +0000
//
cocos2d::CCNodeRGBA *__fastcall GJAccountSettingsLayer::createToggleButton(
int a1,
int a2,
int a3,
int a4,
bool a5,
const cocos2d::CCPoint *a6,
int a7,
float a8,
float a9)
{
int v11; // r10
const char *v12; // r1
int v13; // r6
cocos2d::CCNodeRGBA *v14; // r7
const char *v15; // r2
cocos2d::CCLabelBMFont *v16; // r0
cocos2d::CCLabelBMFont *v17; // r5
void (__fastcall *v18)(cocos2d::CCLabelBMFont *, _BYTE *); // r9
void (__fastcall *v19)(cocos2d::CCLabelBMFont *, _BYTE *); // r11
float *v20; // r0
void (__fastcall *v22)(cocos2d::CCNodeRGBA *, _BYTE *); // [sp+Ch] [bp-28h]
char v23[4]; // [sp+10h] [bp-24h] BYREF
int v24; // [sp+14h] [bp-20h]
_BYTE v25[8]; // [sp+1Ch] [bp-18h] BYREF
_BYTE v26[8]; // [sp+24h] [bp-10h] BYREF
*(_DWORD *)v23 = a3;
v24 = a4;
v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v23);
v13 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v12);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1056964608);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v13 + 80))(v13, 1056964608);
v14 = CCMenuItemToggler::create(v11, v13, a1, *(int *)v23, v24);
CCMenuItemToggler::toggle(v14, a5);
(*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCNodeRGBA *))(*(_DWORD *)a6 + 228))(a6, v14);
v22 = *(void (__fastcall **)(cocos2d::CCNodeRGBA *, _BYTE *))(*(_DWORD *)v14 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v26, a6);
v22(v14, v26);
CCMenuItemToggler::setSizeMult(v14, 1.5);
if ( (*(_BYTE *)a2 & 1) != 0 )
v16 = *(cocos2d::CCLabelBMFont **)(a2 + 8);
else
v16 = (cocos2d::CCLabelBMFont *)(a2 + 1);
v17 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v16, "bigFont.fnt", v15);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v17);
v18 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v17 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, 0.0, 0.5);
v18(v17, v26);
v19 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v17 + 92);
v20 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v11 + 164))(v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (float)((float)(*v20 * 0.5) * 0.5) + 4.0, 0.0);
cocos2d::CCPoint::operator+(v26, a7, v25);
v19(v17, v26);
cocos2d::CCLabelBMFont::limitLabelWidth(v17, a8, a9, 0.0);
return v14;
}