//
// EditorCommandsPopup::layoutCommandButtons from 0x77ad14 to 0x77ae40 (300 bytes)
//
// 2 xrefs:
// > EditorCommandsPopup::onBuildWindowContent @ 0x77af3c
// > EditorCommandsPopup::onWindowResized @ 0x77af8c
//
// 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:59:23 +0000
//
void __fastcall EditorCommandsPopup::layoutCommandButtons(EditorCommandsPopup *this)
{
int v2; // r0
float v3; // s16
cocos2d::CCArray *v4; // r0
float v5; // s18
cocos2d::CCArray *v6; // r10
float v7; // s19
float v8; // s17
signed int v9; // r5
float v10; // r3
int v11; // r4
float *v12; // r0
float *v13; // r6
void (__fastcall *v14)(float *, _BYTE *); // r11
float v15; // s17
float v16; // s17
float v17; // s15
_BYTE v18[8]; // [sp+4h] [bp-10h] BYREF
v2 = *((_DWORD *)this + 182);
if ( v2 && *((_DWORD *)this + 181) )
{
v3 = *((float *)this + 183) / 160.0;
if ( v3 < 0.6 )
v3 = 0.6;
v4 = (cocos2d::CCArray *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 244))(v2);
v5 = v3 * 16.0;
v6 = v4;
v7 = v3 * 5.0;
v8 = v3 * 8.0;
if ( v4 )
{
v9 = 0;
v11 = cocos2d::CCArray::count(v4);
while ( v9 < v11 )
{
v12 = (float *)cocos2d::CCArray::objectAtIndex(v6, v9);
v13 = v12;
if ( v12 )
{
(*(void (__fastcall **)(float *, float))(*(_DWORD *)v12 + 80))(v12, COERCE_FLOAT(LODWORD(v3)));
v13[79] = v3;
v14 = *(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v18,
*((float *)this + 183) * 0.5,
(float)((float)-v8 - (float)(v5 * 0.5)) - (float)((float)v9 * (float)(v5 + v7)));
v14(v13, v18);
}
++v9;
}
v15 = v8 + v8;
if ( v11 > 0 )
LODWORD(v10) = v11 - 1;
v16 = v15 + (float)((float)v11 * v5);
if ( v11 <= 0 )
v17 = 0.0;
else
v17 = v10;
if ( v11 > 0 )
v17 = (float)SLODWORD(v17) * v7;
ScrollableContentLayer::setContentHeight(*((ScrollableContentLayer **)this + 181), v16 + v17);
}
}
}