//
// EditorCommandsPopup::onCommand from 0xcbbf6c to 0xcbc17c (528 bytes)
//
// 3 xrefs:
// > ??> @ 0x88fc0
// > EditorCommandsPopup::addCommandButton @ 0xcbc60c
// > ??> @ 0x1543988
//
// 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::onCommand(__int64 this, cocos2d::CCObject *a2)
{
__int64 v2; // x19
EditorUI *v3; // x19
cocos2d::CCArray *SelectedObjects; // x1
EditorUI *v5; // x19
cocos2d::CCArray *v6; // x1
EditorUI *v7; // x19
cocos2d::CCArray *v8; // x1
EditorUI *v9; // x19
cocos2d::CCArray *v10; // x1
EditorUI *v11; // x19
cocos2d::CCArray *v12; // x0
if ( *(_QWORD *)(this + 1016) )
{
v2 = this;
this = (*(unsigned int (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2) - 1;
switch ( (int)this )
{
case 0:
this = EditorUI::dynamicGroupUpdate(*(EditorUI **)(v2 + 1016), 1u);
break;
case 1:
this = EditorUI::dynamicGroupUpdate(*(EditorUI **)(v2 + 1016), 0);
break;
case 2:
this = EditorUI::createLoop(*(EditorUI **)(v2 + 1016));
break;
case 3:
v3 = *(EditorUI **)(v2 + 1016);
SelectedObjects = EditorUI::getSelectedObjects(v3);
this = EditorUI::alignObjectsOnAxis((cocos2d::CCDictionary ***)v3, SelectedObjects, 0);
break;
case 4:
v5 = *(EditorUI **)(v2 + 1016);
v6 = EditorUI::getSelectedObjects(v5);
this = EditorUI::alignObjectsOnAxis((cocos2d::CCDictionary ***)v5, v6, 1u);
break;
case 5:
v7 = *(EditorUI **)(v2 + 1016);
v8 = EditorUI::getSelectedObjects(v7);
this = EditorUI::alignObjects((cocos2d::CCDictionary ***)v7, v8, 0);
break;
case 6:
v9 = *(EditorUI **)(v2 + 1016);
v10 = EditorUI::getSelectedObjects(v9);
this = EditorUI::alignObjects((cocos2d::CCDictionary ***)v9, v10, 1u);
break;
case 7:
this = EditorUI::selectAll(*(LevelEditorLayer ***)(v2 + 1016));
break;
case 8:
this = EditorUI::selectAllWithDirection(*(LevelEditorLayer ***)(v2 + 1016), 1u);
break;
case 9:
this = EditorUI::selectAllWithDirection(*(LevelEditorLayer ***)(v2 + 1016), 0);
break;
case 10:
this = EditorUI::assignNewGroups(*(EditorUI **)(v2 + 1016), 0);
break;
case 11:
this = EditorUI::assignNewGroups(*(EditorUI **)(v2 + 1016), 1u);
break;
case 12:
this = EditorUI::doCopyObjects(*(EditorUI **)(v2 + 1016), 1u);
break;
case 13:
this = EditorUI::doPasteObjects(*(EditorUI **)(v2 + 1016), 1u);
break;
case 14:
v11 = *(EditorUI **)(v2 + 1016);
v12 = EditorUI::getSelectedObjects(v11);
this = (__int64)EditorUI::createRockBases(v11, v12);
break;
case 15:
this = LevelEditorLayer::unlockAllLayers(*(_QWORD *)(*(_QWORD *)(v2 + 1016) + 1440LL));
break;
case 16:
this = LevelEditorLayer::resetUnusedColorChannels(*(LevelEditorLayer **)(*(_QWORD *)(v2 + 1016) + 1440LL));
break;
case 17:
this = EditorUI::uncheckPortals(*(LevelEditorLayer ***)(v2 + 1016));
break;
case 18:
this = EditorUI::createGradientFromSelection(*(EditorUI **)(v2 + 1016));
break;
default:
return this;
}
}
return this;
}