//
// EditorCommandsPopup::layoutCommandButtons from 0xcbc658 to 0xcbc7f8 (416 bytes)
//
// 3 xrefs:
// > EditorCommandsPopup::onBuildWindowContent @ 0xcbc99c
// > EditorCommandsPopup::onWindowResized @ 0xcbc9a0
// > ??> @ 0x6c4f0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:06:15 +0000
//
__int64 __fastcall EditorCommandsPopup::layoutCommandButtons(EditorCommandsPopup *this)
{
__int64 v2; // x0
float v3; // s8
float v4; // s9
float v5; // s12
float v6; // s11
cocos2d::CCArray *v7; // x0
cocos2d::CCArray *v8; // x24
int v9; // w0
int v10; // w22
signed int v11; // w20
__int64 v12; // x0
__int64 v13; // x19
__int64 v14; // x1
void (__fastcall *v15)(__int64, _BYTE *); // x26
float v16; // s12
float v17; // s0
_BYTE v19[8]; // [xsp+80h] [xbp+80h] BYREF
v2 = *((_QWORD *)this + 131);
if ( v2 && *((_QWORD *)this + 130) )
{
v3 = *((float *)this + 264) / 160.0;
if ( v3 < 0.6 )
{
v6 = 4.8;
v4 = 9.6;
v3 = 0.6;
v5 = 3.0;
}
else
{
v4 = v3 * 16.0;
v5 = v3 * 5.0;
v6 = v3 * 8.0;
}
v7 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 488LL))(v2);
v8 = v7;
if ( v7 )
{
v9 = cocos2d::CCArray::count(v7);
v10 = v9;
if ( v9 <= 0 )
{
v16 = 0.0;
v17 = (float)(v4 * (float)v9) + (float)(v6 * 2.0);
}
else
{
v11 = 0;
do
{
v12 = cocos2d::CCArray::objectAtIndex(v8, v11);
v13 = v12;
if ( v12 )
{
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, v3);
v14 = *(_QWORD *)v13;
*(float *)(v13 + 404) = v3;
v15 = *(void (__fastcall **)(__int64, _BYTE *))(v14 + 184);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v19,
*((float *)this + 264) * 0.5,
(float)-(float)(v6 + (float)(v4 * 0.5)) - (float)((float)v11 * (float)(v4 + v5)));
v15(v13, v19);
}
++v11;
}
while ( v10 != v11 );
v16 = (float)(v10 - 1) * v5;
v17 = (float)(v4 * (float)v10) + (float)(v6 * 2.0);
}
ScrollableContentLayer::setContentHeight(*((ScrollableContentLayer **)this + 130), v17 + v16);
}
}
return _stack_chk_guard;
}