//
// GJAccountSettingsLayer::createToggleButton from 0x8c9ef8 to 0x8ca100 (520 bytes)
//
// 9 xrefs:
// > GJAccountSettingsLayer::init @ 0x8de928
// > GJAccountSettingsLayer::init @ 0x8de9c0
// > GJAccountSettingsLayer::init @ 0x8dea5c
// > GJAccountSettingsLayer::init @ 0x8dec60
// > GJAccountSettingsLayer::init @ 0x8decfc
// > GJAccountSettingsLayer::init @ 0x8deef0
// > GJAccountSettingsLayer::init @ 0x8def88
// > GJAccountSettingsLayer::init @ 0x8df020
// > ??> @ 0x86370
//
// 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
//
CCMenuItemToggler *__fastcall GJAccountSettingsLayer::createToggleButton(
__int64 a1,
float a2,
float a3,
__int64 a4,
void (__cdecl *a5)(cocos2d::CCObject *),
size_t a6,
bool a7,
cocos2d::CCNode *a8,
const cocos2d::CCPoint *a9)
{
cocos2d::CCSprite *v15; // x22
cocos2d::CCSprite *v16; // x21
CCMenuItemToggler *v17; // x21
cocos2d::CCNode *v18; // x0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
cocos2d::CCLabelBMFont *v20; // x20
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26
cocos2d::CCSprite *v22; // x0
const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1
void (__fastcall *v24)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22
float *v25; // x0
cocos2d::CCPoint v27; // [xsp+98h] [xbp+98h] BYREF
cocos2d::CCPoint v28; // [xsp+A0h] [xbp+A0h] BYREF
cocos2d::CCPoint v29; // 0:kr00_8.8
cocos2d::SEL_MenuHandler v30; // 0:^80.16
v30.ptr = a5;
v30.adj = a6;
v15 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png");
v16 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png");
v15->setScale(v15, 0.5);
v16->setScale(v16, 0.5);
v17 = CCMenuItemToggler::create(v15, v16, (cocos2d::CCObject *)a1, v30);
CCMenuItemToggler::toggle(v17, a7);
a8->addChild(a8, v17);
v18 = a8;
setPosition = v17->setPosition;
v29 = cocos2d::CCNode::convertToNodeSpace(v18, a9);
((void (__fastcall *)(CCMenuItemToggler *, cocos2d::CCPoint *, float, float))setPosition)(v17, &v28, v29.x, v29.y);
CCMenuItemToggler::setSizeMult(v17, 1.5);
v20 = cocos2d::CCLabelBMFont::create();
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 576) + 440LL))(
*(_QWORD *)(a1 + 576),
v20);
setAnchorPoint = v20->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v28, 0.0, 0.5);
setAnchorPoint(v20, &v28);
v22 = v15;
getContentSize = v15->getContentSize;
v24 = v20->setPosition;
v25 = (float *)getContentSize(v22);
cocos2d::CCPoint::CCPoint(&v27, (float)((float)(*v25 * 0.5) * 0.5) + 4.0, 0.0);
cocos2d::CCPoint::operator+(&v28, a9, &v27);
v24(v20, &v28);
cocos2d::CCLabelBMFont::limitLabelWidth(v20, a2, a3, 0.0);
return v17;
}