// // GJAccountSettingsLayer::createToggleButton from 0x140293ae0 to 0x140293ce3 (515 bytes) // // 9 xrefs: // > GJAccountSettingsLayer::init @ 0x140292884 // > GJAccountSettingsLayer::init @ 0x14029293f // > GJAccountSettingsLayer::init @ 0x1402929eb // > GJAccountSettingsLayer::init @ 0x140292c11 // > GJAccountSettingsLayer::init @ 0x140292cb0 // > GJAccountSettingsLayer::init @ 0x140292eba // > GJAccountSettingsLayer::init @ 0x140292f6d // > GJAccountSettingsLayer::init @ 0x140293011 // > @ 0x1406d1a00 // // 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=1 CCMenuItemToggler *__fastcall GJAccountSettingsLayer::createToggleButton( __int64 a1, const char *a2, cocos2d::SEL_MenuHandler *a3, __int64 a4, cocos2d::CCNode *a5, __int64 a6, float a7, float a8) { struct cocos2d::CCSprite *v11; // rbp struct cocos2d::CCSprite *v12; // rbx CCMenuItemToggler *v13; // r15 CCMenuItemToggler_vtbl *v14; // rbx struct cocos2d::CCPoint v15; // rax const char *v16; // rcx cocos2d::CCLabelBMFont *v17; // rdi float v18; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v19; // rbx double v20; // xmm0_8 const cocos2d::CCPoint *v21; // rax float *v22; // rax struct cocos2d::CCPoint v24[3]; // [rsp+20h] [rbp-68h] BYREF v24[2] = (struct cocos2d::CCPoint)a2; v11 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v12 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v11->setScale_0)(v11); ((void (__fastcall *)(struct cocos2d::CCSprite *))v12->setScale_0)(v12); v13 = CCMenuItemToggler::create(v11, v12, (cocos2d::CCObject *)a1, a3); CCMenuItemToggler::toggle(v13, 1); a5->addChild_1(a5, v13); v14 = v13->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v15 = cocos2d::CCNode::convertToNodeSpace(a5, v24); ((void (__fastcall *)(CCMenuItemToggler *, struct cocos2d::CCPoint))v14->setPosition_0)(v13, v15); *(_DWORD *)(*(_QWORD *)&v13->m_nScriptTapHandler + 372LL) = 1069547520; HIDWORD(v13->m_offButton->m_pfnSelector.adj) = 1069547520; CCMenuItemToggler::toggle(v13, (bool)v13->m_onButton); v16 = a2; if ( *((_QWORD *)a2 + 3) > 0xFu ) v16 = *(const char **)a2; v17 = cocos2d::CCLabelBMFont::create(v16, (const char *)&qword_14052A4D8); v18 = (*(float (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 576) + 448LL))( *(_QWORD *)(a1 + 576), v17); v19 = v17->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v20 = cocos2d::CCPoint::CCPoint(v18, 0.0); v19->setAnchorPoint(v17, v21); v22 = (float *)v11->getContentSize(v11); cocos2d::CCPoint::CCPoint(*(float *)&v20, (float)((float)(*v22 * 0.5) * 0.5) + 4.0); cocos2d::CCPoint::operator+(a6, v24); v17->setPosition_0(v17, v24); cocos2d::CCLabelBMFont::limitLabelWidth(v17, a7, a8, 0.0); sub_14003A830((__int64)a2); return v13; }