//
// EditorUI::getSimpleButton from 0x37c6a8 to 0x37c740 (152 bytes)
//
// 0 xrefs:
//
// 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
//
CCMenuItemSpriteExtra *__fastcall EditorUI::getSimpleButton(
unsigned int a1,
const char **a2,
unsigned int a3,
int a4,
int a5)
{
cocos2d::CCSprite *v6; // r4
void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // r7
float width; // s17
int v9; // r0
const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // r3
float height; // s15
CCMenuItemSpriteExtra *v12; // r4
v6 = cocos2d::CCSprite::createWithSpriteFrameName(*a2);
setScale = v6->setScale;
width = v6->getContentSize(v6)->width;
v9 = (int)v6->getContentSize(v6);
getContentSize = v6->getContentSize;
if ( (float)(18.0 / width) <= (float)(18.0 / *(float *)(v9 + 4)) )
height = getContentSize(v6)->width;
else
height = getContentSize(v6)->height;
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))setScale)(v6, 18.0 / height);
v12 = CCMenuItemSpriteExtra::create(v6, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(a3, a1));
if ( a5 )
(*(void (__fastcall **)(int, CCMenuItemSpriteExtra *))(*(_DWORD *)a5 + 220))(a5, v12);
return v12;
}