//
// EditorUI::menuItemFromObjectString from 0x6f602c to 0x6f6170 (324 bytes)
//
// 1 xrefs:
// > EditorUI::createCustomItems @ 0x6f6670
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:57:39 +0000
//
cocos2d::CCObject *__fastcall EditorUI::menuItemFromObjectString(int a1, int a2, int a3)
{
ButtonSprite *v4; // r4
float v5; // s16
int v6; // r0
int (__fastcall *v7)(ButtonSprite *); // r3
float v8; // s15
ButtonSprite *v9; // r0
int v10; // r11
int v11; // r8
cocos2d::CCObject *v12; // r0
cocos2d::CCObject *v13; // r4
float v15; // [sp+14h] [bp-30h]
void (__fastcall *v17)(ButtonSprite *, _DWORD *); // [sp+1Ch] [bp-28h]
_BYTE v18[8]; // [sp+20h] [bp-24h] BYREF
_DWORD v19[2]; // [sp+28h] [bp-1Ch] BYREF
int v20[3]; // [sp+30h] [bp-14h] BYREF
std::string::basic_string(v20, a2);
v4 = EditorUI::spriteFromObjectString((int *)a1, (unsigned __int8 *)v20, 1, 0, 100, nullptr, nullptr, 0);
std::string::~string((int)v20);
v5 = *(float *)(*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 164))(v4);
v6 = (*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 164))(v4);
v7 = *(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 164);
if ( v5 <= *(float *)(v6 + 4) )
v8 = *(float *)(v7(v4) + 4);
else
v8 = *(float *)v7(v4);
(*(void (__fastcall **)(ButtonSprite *, _DWORD))(*(_DWORD *)v4 + 80))(v4, 40.0 / v8);
v9 = ButtonSprite::create(v4, (cocos2d::CCSprite *)&dword_20, 0, 32.0, 1.0, 1, "GJ_button_04.png", nullptr, 0.0, v15);
v17 = *(void (__fastcall **)(ButtonSprite *, _DWORD *))(*(_DWORD *)v4 + 92);
v10 = (int)v9;
v11 = (*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 96))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, -1.0);
cocos2d::CCPoint::operator+(v19, v11, v18);
v17(v4, v19);
v19[0] = EditorUI::onCreateButton;
v19[1] = 0;
v12 = (cocos2d::CCObject *)CreateMenuItem::create(v10, 0, a1, (int)EditorUI::onCreateButton, 0);
*((_DWORD *)v12 + 101) = a3;
v13 = v12;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v12 + 80))(v12, 1063675494);
*((_DWORD *)v13 + 79) = 1063675494;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 900), v13);
return v13;
}