// // EditorUI::menuItemFromObjectString from 0x6972b0 to 0x697508 (600 bytes) // // 2 xrefs: // > EditorUI::createCustomItems @ 0x6975f8 // > @ 0x6d1d0 // // 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 // cocos2d::CCObject *__fastcall EditorUI::menuItemFromObjectString(EditorUI *a1, __int64 a2, int a3) { ButtonSprite *v5; // x19 char *v6; // x0 float width; // s8 float height; // s0 const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1 float v10; // s0 cocos2d::CCNode *v11; // x25 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 __int64 v13; // x27 CreateMenuItem *v14; // x0 CreateMenuItem_vtbl *v15; // x1 cocos2d::CCObject *v16; // x19 cocos2d::CCArray *m_customObjectButtonArray; // x0 unsigned int *v19; // x2 int v20; // w1 cocos2d::CCPoint v21; // [xsp+68h] [xbp+68h] BYREF _DWORD *v22; // [xsp+70h] [xbp+70h] BYREF cocos2d::SEL_MenuHandler v23; // 0:x3.16 sub_D18D28(&v22, a2); v5 = (ButtonSprite *)EditorUI::spriteFromObjectString(a1, (const void **)&v22, 1, 0, 100, nullptr, nullptr, 0); v6 = (char *)(v22 - 6); if ( v22 - 6 != (_DWORD *)&qword_124B6B0 ) { if ( &pthread_create ) { v19 = v22 - 2; do v20 = __ldaxr(v19); while ( __stlxr(v20 - 1, v19) ); } else { v20 = *(v22 - 2); *(v22 - 2) = v20 - 1; } if ( v20 <= 0 ) operator delete(v6); } width = v5->getContentSize(v5)->width; height = v5->getContentSize(v5)->height; getContentSize = v5->getContentSize; if ( width > height ) v10 = getContentSize(v5)->width; else v10 = getContentSize(v5)->height; v5->setScale(v5, 40.0 / v10); v11 = (cocos2d::CCNode *)ButtonSprite::create( v5, (cocos2d::CCSprite *)&qword_20, 0, 1, 32.0, 1.0, (cocos2d::CCSprite *)"GJ_button_04.png", nullptr); setPosition = v5->setPosition; v13 = (__int64)v5->getPosition(v5); cocos2d::CCPoint::CCPoint(&v21, 0.0, -1.0); cocos2d::CCPoint::operator+(&v22, v13, &v21); setPosition(v5, (const cocos2d::CCPoint *)&v22); v23.adj = 0; v23.ptr = (void (__cdecl *)(cocos2d::CCObject *))EditorUI::onCreateButton; v14 = CreateMenuItem::create(v11, nullptr, a1, v23); v15 = v14->CCMenuItemSpriteExtra::cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v14->m_objectID = a3; v16 = v14; ((void (__fastcall *)(float))v15->setScale)(0.9); m_customObjectButtonArray = a1->m_customObjectButtonArray; v16[7].m_nLuaID = 1063675494; cocos2d::CCArray::addObject(m_customObjectButtonArray, v16); return v16; }
GD Web Decomp Icon

GD Web Decomp

Raw Source