// // VideoOptionsLayer::createToggleButton from 0x424894 to 0x424a26 (402 bytes) // // 3 xrefs: // > VideoOptionsLayer::init @ 0x424d58 // > VideoOptionsLayer::init @ 0x424dd4 // > VideoOptionsLayer::init @ 0x424ed0 // // 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 VideoOptionsLayer::createToggleButton( int a1, int a2, cocos2d::SEL_MenuHandler a3, bool a4, cocos2d::CCNode *a5, const cocos2d::CCPoint *a6, float a7, float a8, char a9, cocos2d::CCArray *a10) { cocos2d::CCSprite *v11; // r6 cocos2d::CCSprite *v12; // r5 CCMenuItemToggler *v13; // r8 cocos2d::CCLabelBMFont *v14; // r4 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r11 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v17; // r0 float v18; // r1 float v19; // r2 float *v20; // r0 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+8h] [bp-2Ch] cocos2d::CCPoint v24; // [sp+1Ch] [bp-18h] BYREF cocos2d::CCPoint v25; // [sp+24h] [bp-10h] BYREF v11 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v12 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v11->setScale)(v11, LODWORD(a7)); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v12->setScale)(v12, LODWORD(a7)); v13 = CCMenuItemToggler::create(v12, v11, (cocos2d::CCObject *)a1, a3); CCMenuItemToggler::toggle(v13, a4); a5->addChild(a5, v13); setPosition = v13->setPosition; cocos2d::CCNode::convertToNodeSpace(&v25, a5, a6); setPosition(v13, &v25); CCMenuItemToggler::setSizeMult(v13, 1.5); v14 = cocos2d::CCLabelBMFont::create(); (*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**(_DWORD **)(a1 + 456) + 220))(*(_DWORD *)(a1 + 456), v14); if ( a10 ) cocos2d::CCArray::addObject(a10, v14); setAnchorPoint = v14->setAnchorPoint; if ( a9 ) { cocos2d::CCPoint::CCPoint(&v25, 0.5, 0.0); setAnchorPoint(v14, &v25); v16 = v14->setPosition; v17 = (int)v11->getContentSize(v11); v18 = 0.0; v19 = (float)((float)(*(float *)(v17 + 4) * 0.5) * a7) + 6.0; } else { cocos2d::CCPoint::CCPoint(&v25, 0.0, 0.5); setAnchorPoint(v14, &v25); v16 = v14->setPosition; v20 = (float *)v11->getContentSize(v11); v19 = 0.0; v18 = (float)((float)(*v20 * 0.5) * a7) + 8.0; } cocos2d::CCPoint::CCPoint(&v24, v18, v19); cocos2d::CCPoint::operator+(&v25, a6, &v24); v16(v14, &v25); cocos2d::CCLabelBMFont::limitLabelWidth(v14, a8, 0.0, 0.0); return v13; }
GD Web Decomp Icon

GD Web Decomp

Raw Source