//
// EditorUI::getSimpleButton from 0x687664 to 0x687754 (240 bytes)
//
// 1 xrefs:
// > ??> @ 0x6a710
//
// 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(
void (__cdecl *a1)(cocos2d::CCObject *),
const char **a2,
size_t a3,
__int64 a4,
__int64 a5)
{
cocos2d::CCSprite *v8; // x19
void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // x24
float v10; // s9
float height; // s0
const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1
long double v13; // q0
CCMenuItemSpriteExtra *v14; // x19
cocos2d::SEL_MenuHandler v16; // 0:x2.16
v8 = cocos2d::CCSprite::createWithSpriteFrameName(*a2);
setScale = v8->setScale;
v10 = 18.0 / v8->getContentSize(v8)->width;
height = v8->getContentSize(v8)->height;
getContentSize = v8->getContentSize;
if ( v10 <= (float)(18.0 / height) )
*(float *)&v13 = 18.0 / getContentSize(v8)->width;
else
*(float *)&v13 = 18.0 / getContentSize(v8)->height;
setScale(v8, v13);
v16.ptr = a1;
v16.adj = a3;
v14 = CCMenuItemSpriteExtra::create(v8, nullptr, v16);
if ( a5 )
(*(void (__fastcall **)(__int64, CCMenuItemSpriteExtra *))(*(_QWORD *)a5 + 440LL))(a5, v14);
return v14;
}