// // LevelSettingsLayer::createToggleButton from 0x140321360 to 0x1403215b0 (592 bytes) // // 2 xrefs: // > LevelSettingsLayer::init @ 0x1403202f8 // > @ 0x1406d4c28 // // 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 void __fastcall LevelSettingsLayer::createToggleButton( __int64 a1, const char *a2, __int64 a3, bool a4, cocos2d::CCNode *a5, __int64 a6) { struct cocos2d::CCSprite *v9; // rbp struct cocos2d::CCSprite *v10; // rbx CCMenuItemToggler *v11; // rdi CCMenuItemToggler_vtbl *v12; // rbx struct cocos2d::CCPoint v13; // rax const char *v14; // rcx struct cocos2d::CCLabelBMFont *v15; // rdi float v16; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v17; // rbx double v18; // xmm0_8 const cocos2d::CCPoint *v19; // rax float *v20; // rax cocos2d::CCLabelBMFont_vtbl *v21; // rbx struct cocos2d::CCPoint v22[3]; // [rsp+20h] [rbp-68h] BYREF v22[2] = (struct cocos2d::CCPoint)a2; v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v10 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v9->setScale_0)(v9); ((void (__fastcall *)(struct cocos2d::CCSprite *))v10->setScale_0)(v10); v11 = CCMenuItemToggler::create( v9, v10, (cocos2d::CCObject *)a1, (cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onDisable); CCMenuItemToggler::toggle(v11, a4); a5->addChild_1(a5, v11); v12 = v11->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v13 = cocos2d::CCNode::convertToNodeSpace(a5, v22); ((void (__fastcall *)(CCMenuItemToggler *, struct cocos2d::CCPoint))v12->setPosition_0)(v11, v13); *(_DWORD *)(*(_QWORD *)&v11->m_nScriptTapHandler + 372LL) = 1069547520; HIDWORD(v11->m_offButton->m_pfnSelector.adj) = 1069547520; CCMenuItemToggler::toggle(v11, (bool)v11->m_onButton); if ( *((_QWORD *)a2 + 2) ) { v14 = a2; if ( *((_QWORD *)a2 + 3) > 0xFu ) v14 = *(const char **)a2; v15 = cocos2d::CCLabelBMFont::create(v14, (const char *)&qword_14052A4D8); v16 = (*(float (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 576) + 448LL))( *(_QWORD *)(a1 + 576), v15); v17 = v15->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v18 = cocos2d::CCPoint::CCPoint(v16, 0.0); v17->setAnchorPoint(v15, v19); v20 = (float *)v9->getContentSize(v9); cocos2d::CCPoint::CCPoint(*(float *)&v18, (float)((float)(*v20 * 0.5) * 0.80000001) + 6.0); cocos2d::CCPoint::operator+(a6, v22); v15->setPosition_0(v15, v22); if ( v15->getContentSize(v15)->width > 110.0 ) { v21 = v15->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v15->getContentSize(v15); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v21->setScale_0)(v15); } ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v15->setScale_0)(v15); } sub_14003A830((__int64)a2); }
GD Web Decomp Icon

GD Web Decomp

Raw Source