// // VideoOptionsLayer::createToggleButton from 0x7cc93c to 0x7ccbc8 (652 bytes) // // 4 xrefs: // > VideoOptionsLayer::init @ 0x7ccff4 // > VideoOptionsLayer::init @ 0x7cd0b8 // > VideoOptionsLayer::init @ 0x7cd174 // > @ 0x6b3e8 // // 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( __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, unsigned __int8 a10, cocos2d::CCArray *a11) { int v16; // w26 cocos2d::CCSprite *v17; // x22 cocos2d::CCSprite *v18; // x21 CCMenuItemToggler *v19; // x21 cocos2d::CCNode *v20; // x0 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 cocos2d::CCLabelBMFont *v22; // x19 cocos2d::CCLabelBMFont_vtbl *v23; // x1 void (__fastcall *v24)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCSprite *v25; // x0 const cocos2d::CCSize *(__fastcall *v26)(const cocos2d::CCNode *__hidden); // x1 void (__fastcall *v27)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 float width; // s0 float v29; // s1 float v30; // s0 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCSprite *v33; // x0 const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1 float height; // s1 cocos2d::CCPoint v37; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCPoint v38; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCPoint v39; // 0:kr00_8.8 cocos2d::SEL_MenuHandler v40; // 0:^90.16 v16 = a10; v40.ptr = a5; v40.adj = a6; v17 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); v17->setScale(v17, a2); v18->setScale(v18, a2); v19 = CCMenuItemToggler::create(v18, v17, (cocos2d::CCObject *)a1, v40); CCMenuItemToggler::toggle(v19, a7); a8->addChild(a8, v19); v20 = a8; setPosition = v19->setPosition; v39 = cocos2d::CCNode::convertToNodeSpace(v20, a9); ((void (__fastcall *)(CCMenuItemToggler *, cocos2d::CCPoint *, float, float))setPosition)(v19, &v38, v39.x, v39.y); CCMenuItemToggler::setSizeMult(v19, 1.5); v22 = cocos2d::CCLabelBMFont::create(); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v22); if ( a11 ) cocos2d::CCArray::addObject(a11, v22); v23 = v22->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( v16 ) { setAnchorPoint = v23->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v38, 0.5, 0.0); setAnchorPoint(v22, &v38); v33 = v17; getContentSize = v17->getContentSize; v27 = v22->setPosition; height = getContentSize(v33)->height; v30 = 0.0; v29 = (float)((float)(height * 0.5) * a2) + 6.0; } else { v24 = v23->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v38, 0.0, 0.5); v24(v22, &v38); v25 = v17; v26 = v17->getContentSize; v27 = v22->setPosition; width = v26(v25)->width; v29 = 0.0; v30 = (float)((float)(width * 0.5) * a2) + 8.0; } cocos2d::CCPoint::CCPoint(&v37, v30, v29); cocos2d::CCPoint::operator+(&v38, a9, &v37); v27(v22, &v38); cocos2d::CCLabelBMFont::limitLabelWidth(v22, a3, 0.0, 0.0); return v19; }
GD Web Decomp Icon

GD Web Decomp

Raw Source