//
// EditorUI::handleEditorAction from 0x6f17e4 to 0x6f26ca (3814 bytes)
//
// 1 xrefs:
// > EditorUI::handleAction @ 0x6f282a
//
// 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:57:36 +0000
//
int __fastcall EditorUI::handleEditorAction(GJTransformControl **this, int a2, int a3, int a4, double a5)
{
GameSettingsLayer *v6; // r1
int v9; // r5
int v10; // r0
unsigned int v11; // r1
int v12; // r5
EditorSFXManager *v13; // r0
EditorSFXManager *v14; // r0
int v15; // r1
float v16; // s18
float v17; // s16
float v18; // s17
const cocos2d::CCPoint *v19; // r0
int v20; // r5
EditorSFXManager *v21; // r0
GameManager *v22; // r0
GameManager *v23; // r0
GameManager *v24; // r0
unsigned __int8 GameVariable; // r0
EditorSFXManager *v26; // r0
EditorSFXManager *v27; // r0
GameManager *v28; // r0
GameManager *v29; // r0
GameManager *v30; // r0
unsigned __int8 v31; // r0
EditorSFXManager *v32; // r0
EditorSFXManager *v33; // r0
GameManager *v34; // r0
GameManager *v35; // r0
GameManager *v36; // r0
GameManager *v37; // r0
GameManager *v38; // r0
int v39; // r5
EditorSFXManager *v40; // r0
EditorSFXManager *v41; // r0
cocos2d::CCArray *v42; // r0
cocos2d::CCArray *v43; // r0
cocos2d::CCArray *SelectedObjects; // r0
cocos2d::CCArray *v45; // r0
cocos2d::CCArray *v46; // r6
cocos2d::CCArray *v47; // r0
GameManager *v48; // r0
GameManager *IntGameVariable; // r0
GameManager *v50; // r5
GameManager *v51; // r0
char v52; // r0
int v53; // r1
int v54; // r3
cocos2d::CCObject *v55; // r0
int v56; // r1
cocos2d::CCObject *v57; // r5
cocos2d::CCObject *v58; // r1
int *v59; // r0
GJTransformControl *v60; // r0
EditorSFXManager *v61; // r0
EditorSFXManager *v62; // r0
GameManager *v63; // r0
GameManager *v64; // r0
GameManager *v65; // r0
unsigned __int8 v66; // r0
EditorSFXManager *v67; // r0
EditorSFXManager *v68; // r0
int v69; // r0
int v70; // r0
EditorSFXManager *v72; // r0
int v73; // r1
cocos2d::CCObject *v74; // r1
LocalLevelManager *v75; // r6
LocalLevelManager *v76; // r0
int v77; // r0
int v78; // r6
GJTransformControl **v79; // [sp+Ch] [bp-2Ch] BYREF
float v80[2]; // [sp+10h] [bp-28h] BYREF
float v81[2]; // [sp+18h] [bp-20h] BYREF
float v82[2]; // [sp+20h] [bp-18h] BYREF
int v83; // [sp+28h] [bp-10h] BYREF
int v84; // [sp+2Ch] [bp-Ch]
int v85; // [sp+30h] [bp-8h]
v6 = (GameSettingsLayer *)(a2 - 19968);
v79 = this;
switch ( (unsigned int)v6 )
{
case 0x21u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::undoLastAction((cocos2d::CCArray ***)this, nullptr);
return v9;
case 0x22u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::redoLastAction((cocos2d::CCArray ***)this, nullptr);
return v9;
case 0x23u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onCopy((EditorUI *)this, nullptr);
return v9;
case 0x24u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onPaste((EditorUI *)this, nullptr);
return v9;
case 0x25u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onDuplicate((EditorUI *)this, nullptr);
return v9;
case 0x26u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onDeselectAll((EditorUI *)this, nullptr);
return v9;
case 0x27u:
case 0x28u:
case 0x29u:
case 0x2Au:
case 0x2Bu:
case 0x2Cu:
case 0x2Du:
case 0x2Eu:
case 0x2Fu:
case 0x30u:
if ( !a3 )
return 1;
v9 = 1;
sub_6F13BC((EditorUI **)&v79, (const char *)v6 - 39, 1);
return v9;
case 0x31u:
case 0x32u:
case 0x33u:
case 0x34u:
case 0x35u:
case 0x36u:
case 0x37u:
case 0x38u:
case 0x39u:
case 0x3Au:
if ( !a3 )
return 1;
v9 = 1;
sub_6F13BC((EditorUI **)&v79, (const char *)v6 - 49, 0);
return v9;
case 0x3Bu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleMode((EditorUI *)this, *(this + 171));
return v9;
case 0x3Cu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleMode((EditorUI *)this, *(this + 172));
return v9;
case 0x3Du:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleMode((EditorUI *)this, *(this + 170));
return v9;
case 0x3Eu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleMode((EditorUI *)this, *(this + 173));
return v9;
case 0x3Fu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::zoomIn((EditorUI *)this, nullptr);
return v9;
case 0x40u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::zoomOut((EditorUI *)this, nullptr);
return v9;
case 0x41u:
if ( !a3 )
return 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v82, 0.0, -10.0);
v9 = 1;
EditorUI::moveGamelayer((EditorUI *)this, (int)v82);
return v9;
case 0x42u:
if ( !a3 )
return 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v82, 0.0, 10.0);
v9 = 1;
EditorUI::moveGamelayer((EditorUI *)this, (int)v82);
return v9;
case 0x43u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onDeleteSelected((EditorUI *)this, nullptr);
return v9;
case 0x44u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::activateTransformControl((EditorUI *)this, nullptr);
return v9;
case 0x45u:
if ( !a3 )
return 1;
goto LABEL_195;
case 0x46u:
if ( a3 )
goto LABEL_195;
return 1;
case 0x47u:
if ( a3 )
goto LABEL_195;
return 1;
case 0x48u:
if ( a3 )
goto LABEL_195;
return 1;
case 0x49u:
case 0x4Au:
case 0x4Bu:
case 0x4Cu:
case 0x4Du:
case 0x4Eu:
case 0x4Fu:
case 0x50u:
case 0x7Fu:
case 0x80u:
case 0x81u:
case 0x82u:
case 0x83u:
case 0x84u:
case 0x85u:
case 0x86u:
case 0x87u:
case 0x88u:
case 0x89u:
case 0x8Au:
case 0x8Bu:
case 0x8Cu:
case 0x8Du:
case 0x8Eu:
case 0xD2u:
case 0xD3u:
case 0xD4u:
case 0xD5u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::moveObjectCall(this, (unsigned __int8)byte_BF01BC[a2 - 20037]);
return v9;
case 0x51u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleEnableRotate((EditorUI *)this, nullptr);
return v9;
case 0x52u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleFreeMove((EditorUI *)this, nullptr);
return v9;
case 0x53u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleSwipe((EditorUI *)this, nullptr);
return v9;
case 0x54u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::toggleSnap((EditorUI *)this, nullptr);
return v9;
case 0x55u:
if ( !a3 || *(this + 131) != (GJTransformControl *)-1 )
return 1;
v9 = 1;
EditorUI::onPlayback((int)this, nullptr);
return v9;
case 0x56u:
if ( !a3 )
return 1;
v16 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)*(this + 236) + 609) + 84))(*((_DWORD *)*(this + 236) + 609)));
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v16));
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v80);
v17 = (float)(*((float *)this + 158) * 0.5) + (float)(v80[1] * 0.5);
v18 = v80[0] * 0.5;
v19 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)*(this + 236) + 609) + 96))(*((_DWORD *)*(this + 236) + 609));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v19);
v20 = (int)*(this + 236) + 12028;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v82, (float)(v18 - v81[0]) / v16, (float)(v17 - v81[1]) / v16);
cocos2d::CCPoint::operator=(v20, v82);
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Preview Locked.", 0xFu);
EditorUI::showTextAlert((int)this, &v83, 0, 1, 0);
v9 = 1;
std::string::~string((int)&v83);
return v9;
case 0x57u:
if ( !a3 )
return 1;
cocos2d::CCPoint::operator=((char *)*(this + 236) + 12028, &unk_D2DB20);
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Preview Unlocked.", 0x11u);
EditorUI::showTextAlert((int)this, &v83, 0, 1, 0);
v9 = 1;
std::string::~string((int)&v83);
return v9;
case 0x58u:
case 0x5Au:
case 0x5Bu:
case 0xB9u:
case 0xBAu:
case 0xBBu:
case 0xBCu:
case 0xBDu:
case 0xBEu:
case 0xBFu:
case 0xC0u:
case 0xC1u:
case 0xC2u:
case 0xC3u:
case 0xC4u:
case 0xC5u:
case 0xC6u:
case 0xC7u:
case 0xC8u:
case 0xC9u:
case 0xD7u:
case 0xD8u:
if ( !a3 )
return 1;
v21 = (EditorSFXManager *)EditorUI::toggleViewOption((EditorUI *)this, byte_BF01BC[a2 - 19908]);
v9 = (int)v21;
if ( !v21 )
return 1;
v72 = (EditorSFXManager *)EditorSFXManager::sharedState(v21);
if ( a2 == 20058 )
{
v73 = 196;
}
else if ( a2 > 20058 )
{
if ( a2 == 20059 )
{
v73 = 197;
}
else
{
if ( a2 != 20153 )
goto LABEL_249;
v73 = 269;
}
}
else
{
if ( a2 != 20056 )
{
LABEL_249:
v73 = 189;
goto LABEL_252;
}
v73 = 195;
}
LABEL_252:
EditorSFXManager::playAction(v72, v73, 189);
return v9;
case 0x59u:
if ( !a3 )
return 1;
v22 = (GameManager *)GameManager::sharedState((GameManager *)this);
GameManager::toggleGameVariable(v22, "0137");
LevelEditorLayer::updatePreviewParticles(*(this + 236));
v83 = 0;
v84 = 0;
v85 = 0;
v23 = (GameManager *)std::string::__init(&v83, "Particle Icons: ", 0x10u);
v24 = (GameManager *)GameManager::sharedState(v23);
GameVariable = GameManager::getGameVariable(v24, "0137");
EditorUI::showTextAlert((int)this, &v83, GameVariable ^ 1, 0, 0);
v9 = 1;
v26 = (EditorSFXManager *)std::string::~string((int)&v83);
v27 = (EditorSFXManager *)EditorSFXManager::sharedState(v26);
EditorSFXManager::playAction(v27, 198, 189);
return v9;
case 0x5Cu:
if ( !a3 )
return 1;
v34 = (GameManager *)GameManager::sharedState((GameManager *)this);
v35 = (GameManager *)GameManager::getGameVariable(v34, "0097");
v9 = (int)v35;
if ( !v35 )
return 1;
v36 = (GameManager *)GameManager::sharedState(v35);
v37 = (GameManager *)GameManager::toggleGameVariable(v36, "0180");
v38 = (GameManager *)GameManager::sharedState(v37);
*((_BYTE *)this + 644) = GameManager::getGameVariable(v38, "0180");
EditorUI::updateButtons(this);
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Link Mode: ", 0xBu);
EditorUI::showTextAlert((int)this, &v83, *((unsigned __int8 *)this + 644) ^ 1, 0, 0);
std::string::~string((int)&v83);
return v9;
case 0x5Du:
if ( !a3 )
return 1;
v9 = EditorUI::toggleTraceSelected(this, 1);
if ( !v9 )
return 1;
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Trace In: ", 0xAu);
EditorUI::showTextAlert((int)this, &v83, *((_DWORD *)*(this + 236) + 3054) != 0, 0, 0);
std::string::~string((int)&v83);
return v9;
case 0x5Eu:
if ( !a3 )
return 1;
v9 = EditorUI::toggleTraceSelected(this, 0);
if ( !v9 )
return 1;
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Trace Out: ", 0xBu);
EditorUI::showTextAlert((int)this, &v83, *((_DWORD *)*(this + 236) + 3055) != 0, 0, 0);
std::string::~string((int)&v83);
return v9;
case 0x5Fu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGroupUp((EditorUI *)this, nullptr);
return v9;
case 0x60u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGroupDown((EditorUI *)this, nullptr);
return v9;
case 0x61u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onTargetIDChange((EditorUI *)this, (cocos2d::CCObject *)((char *)&dword_0 + 1));
return v9;
case 0x62u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onTargetIDChange((EditorUI *)this, (cocos2d::CCObject *)0xFFFFFFFF);
return v9;
case 0x65u:
*((_BYTE *)this + 508) = a3;
return 1;
case 0x66u:
if ( a3 )
goto LABEL_195;
return 1;
case 0x67u:
if ( a3 )
goto LABEL_195;
return 1;
case 0x68u:
if ( !a3 )
return 1;
LABEL_195:
v9 = 1;
EditorUI::transformObjectCall();
return v9;
case 0x69u:
case 0x6Au:
if ( !a3 )
return 1;
v55 = (cocos2d::CCObject *)cocos2d::CCNode::create((cocos2d::CCNode *)this);
if ( a2 == 20073 )
v56 = 45;
else
v56 = 46;
v57 = v55;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v55 + 36))(v55, v56);
v58 = v57;
v9 = 1;
EditorUI::activateScaleControl((EditorUI *)this, v58);
return v9;
case 0x6Eu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::editObject(this, nullptr);
return v9;
case 0x6Fu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::editGroup((EditorUI *)this, nullptr);
return v9;
case 0x70u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::editObject2((EditorUI *)this, nullptr);
return v9;
case 0x71u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onCopyState((EditorUI *)this, nullptr);
return v9;
case 0x72u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onPasteState((EditorUI *)this, nullptr);
return v9;
case 0x73u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onPasteColor((EditorUI *)this, nullptr);
return v9;
case 0x74u:
case 0x75u:
case 0x96u:
case 0xB1u:
case 0xB2u:
if ( !a3 )
return 1;
switch ( a2 )
{
case 20118:
EditorUI::toggleCustomGridEnabled((EditorUI *)this);
if ( *((_BYTE *)this + 480) )
v12 = 202;
else
v12 = 203;
break;
case 20084:
v12 = 200;
EditorUI::cycleCustomGridPreset((EditorUI *)this, 1);
break;
case 20085:
v12 = 201;
EditorUI::cycleCustomGridPreset((EditorUI *)this, 0);
break;
case 20145:
v12 = 204;
EditorUI::adjustCustomGridSize((EditorUI *)this, 1);
break;
default:
v12 = 205;
EditorUI::adjustCustomGridSize((EditorUI *)this, -1);
break;
}
EditorUI::refreshGridWindow((EditorUI *)this, v11);
v13 = (EditorSFXManager *)EditorUI::showGridSizeAlert((EditorUI *)this);
v14 = (EditorSFXManager *)EditorSFXManager::sharedState(v13);
v15 = v12;
v9 = 1;
EditorSFXManager::playAction(v14, v15, 189);
return v9;
case 0x76u:
if ( !a3 )
return 1;
v69 = (int)*(this + 236);
if ( *(_DWORD *)(*(_DWORD *)(v69 + 1408) + 952) != 2 )
return 1;
if ( *(_DWORD *)(v69 + 1428) )
goto LABEL_260;
v9 = LevelEditorLayer::saveLevel(v69);
if ( !v9 )
return 1;
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Level Saved.", 0xCu);
EditorUI::showTextAlert((int)this, &v83, 0, 1, 0);
std::string::~string((int)&v83);
return v9;
case 0x78u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::dynamicGroupUpdate((int)this, 0);
return v9;
case 0x79u:
if ( !a3 )
return 1;
EditorUI::createLoop(this);
return 1;
case 0x7Au:
if ( !a3 )
return 1;
SelectedObjects = (cocos2d::CCArray *)EditorUI::getSelectedObjects((EditorUI *)this);
v9 = 1;
EditorUI::alignObjects((EditorUI *)this, SelectedObjects, 0);
return v9;
case 0x7Bu:
if ( !a3 )
return 1;
v45 = (cocos2d::CCArray *)EditorUI::getSelectedObjects((EditorUI *)this);
v9 = 1;
EditorUI::alignObjects((EditorUI *)this, v45, 1);
return v9;
case 0x7Cu:
if ( !a3 )
return 1;
EditorUI::selectAll((EditorUI *)this);
return 1;
case 0x7Du:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::selectAllWithDirection((EditorUI *)this, 1);
return v9;
case 0x7Eu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::selectAllWithDirection((EditorUI *)this, 0);
return v9;
case 0x90u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::selectBuildTab((unsigned int)this, (unsigned int)*(this + 254) - 1);
return v9;
case 0x91u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::selectBuildTab((unsigned int)this, (unsigned int)*(this + 254) + 1);
return v9;
case 0x92u:
if ( !a3 )
return 1;
v9 = 1;
(*((void (__fastcall **)(GJTransformControl **, int, _DWORD))*this + 165))(this, 1109393408, 0);
return v9;
case 0x93u:
if ( !a3 )
return 1;
v9 = 1;
(*((void (__fastcall **)(GJTransformControl **, int, _DWORD))*this + 165))(this, -1038090240, 0);
return v9;
case 0x94u:
if ( !a3 )
return 1;
v39 = *((unsigned __int8 *)this + 1053);
*((_BYTE *)this + 1054) = 0;
v39 ^= 1u;
*((_BYTE *)this + 1053) = v39;
if ( !v39 )
{
EditorUI::updateDeleteMenu((EditorUI *)this);
EditorUI::updateCreateMenu((EditorUI *)this, 0);
EditorUI::updateEditMenu((EditorUI *)this);
EditorUI::updateViewMenu((EditorUI *)this);
}
v9 = 1;
v40 = (EditorSFXManager *)EditorUI::showUI(this, *((unsigned __int8 *)this + 1053) ^ 1);
v41 = (EditorSFXManager *)EditorSFXManager::sharedState(v40);
EditorSFXManager::playAction(v41, 194, 189);
return v9;
case 0x95u:
if ( !a3 || !*(this + 264) )
return 1;
EditorUI::nextDpadStep((EditorUI *)this);
return 1;
case 0x97u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onEditorCommands((EditorUI *)this, nullptr);
return v9;
case 0x98u:
if ( !a3 )
return 1;
v42 = (cocos2d::CCArray *)EditorUI::getSelectedObjects((EditorUI *)this);
v9 = 1;
EditorUI::alignObjectsOnAxis((EditorUI *)this, v42, 0);
return v9;
case 0x99u:
if ( !a3 )
return 1;
v43 = (cocos2d::CCArray *)EditorUI::getSelectedObjects((EditorUI *)this);
v9 = 1;
EditorUI::alignObjectsOnAxis((EditorUI *)this, v43, 1);
return v9;
case 0x9Au:
if ( !a3 )
return 1;
EditorUI::createGradientFromSelection((EditorUI *)this);
return 1;
case 0x9Bu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::dynamicGroupUpdate((int)this, 1);
return v9;
case 0x9Cu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::assignNewGroups((int)this, 0);
return v9;
case 0x9Du:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::assignNewGroups((int)this, 1);
return v9;
case 0x9Eu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::doCopyObjects((EditorUI *)this, 1);
return v9;
case 0x9Fu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::doPasteObjects((EditorUI *)this, 1);
return v9;
case 0xA0u:
if ( !a3 )
return 1;
v47 = (cocos2d::CCArray *)EditorUI::getSelectedObjects((EditorUI *)this);
v9 = 1;
EditorUI::createRockBases((EditorUI *)this, v47);
return v9;
case 0xA1u:
if ( !a3 )
return 1;
v9 = 1;
LevelEditorLayer::unlockAllLayers((int)*(this + 236));
return v9;
case 0xA2u:
if ( !a3 )
return 1;
v9 = 1;
LevelEditorLayer::resetUnusedColorChannels(*(this + 236));
return v9;
case 0xA3u:
if ( !a3 )
return 1;
EditorUI::uncheckPortals(this);
return 1;
case 0xA4u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onEditColor((EditorUI *)this, nullptr);
return v9;
case 0xA5u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGoToLayer((EditorUI *)this, nullptr);
return v9;
case 0xA6u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGoToBaseLayer((EditorUI *)this, nullptr);
return v9;
case 0xA7u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGoToFreeLayer((EditorUI *)this, nullptr);
return v9;
case 0xA8u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onLockLayer((EditorUI *)this, nullptr);
return v9;
case 0xA9u:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGroupSticky((int)this, nullptr);
return v9;
case 0xAAu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onUngroupSticky((int)this, nullptr);
return v9;
case 0xACu:
if ( a3 )
goto LABEL_173;
return 1;
case 0xADu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onResetSpecialFilter((EditorUI *)this, nullptr);
return v9;
case 0xAEu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onDeleteSelectedType((EditorUI *)this, nullptr);
return v9;
case 0xAFu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onNewCustomItem((EditorUI *)this, nullptr);
return v9;
case 0xB0u:
if ( !a3 )
return 1;
v70 = (int)*(this + 236);
if ( *(_DWORD *)(*(_DWORD *)(v70 + 1408) + 952) != 2 )
return 1;
if ( *(_DWORD *)(v70 + 1428) )
{
LABEL_260:
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Stop Playtest First.", 0x14u);
EditorUI::showTextAlert((int)this, &v83, 0, 1, 0);
v9 = 1;
std::string::~string((int)&v83);
}
else
{
LevelEditorLayer::saveLevel(v70);
v75 = (LocalLevelManager *)cocos2d::CCArray::createWithObject(*((cocos2d::CCArray **)*(this + 236) + 352), v74);
v76 = (LocalLevelManager *)LocalLevelManager::sharedState(v75);
v77 = LocalLevelManager::exportLevelsToFile(v76, v75);
v78 = v77;
if ( v77 <= 0 )
{
if ( v77 )
{
return 1;
}
else
{
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Export Failed.", 0xEu);
EditorUI::showTextAlert((int)this, &v83, v78, 1, v78);
v9 = 1;
std::string::~string((int)&v83);
}
}
else
{
v83 = 0;
v84 = 0;
v85 = 0;
std::string::__init(&v83, "Level Exported.", 0xFu);
EditorUI::showTextAlert((int)this, &v83, 0, 1, 0);
v9 = 1;
std::string::~string((int)&v83);
}
}
return v9;
case 0xB3u:
case 0xB4u:
case 0xB5u:
case 0xB6u:
v9 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 149) + 176))(*(this + 149));
if ( !v9 )
return v9;
if ( !a3 )
return 1;
if ( a2 == 20149 )
{
v61 = (EditorSFXManager *)GJTransformControl::onToggleGridSnap(*(this + 149), nullptr);
}
else if ( a2 == 20150 )
{
v61 = (EditorSFXManager *)GJTransformControl::onToggleFreeRotation(*(this + 149), nullptr);
}
else
{
v60 = *(this + 149);
if ( a2 == 20148 )
v61 = (EditorSFXManager *)GJTransformControl::onToggleOppositeAnchor(v60, nullptr);
else
v61 = (EditorSFXManager *)GJTransformControl::onToggleLockScale(v60, nullptr);
}
v62 = (EditorSFXManager *)EditorSFXManager::sharedState(v61);
EditorSFXManager::playAction(v62, 189);
return v9;
case 0xB7u:
if ( a3 )
{
v59 = KeybindingsLayer::create(nullptr, v6);
if ( v59 )
goto LABEL_203;
}
return 1;
case 0xB8u:
if ( !a3 )
return 1;
v59 = (int *)EditorSoundsLayer::create((EditorSoundsLayer *)this, v6);
if ( !v59 )
return 1;
LABEL_203:
v9 = 1;
(*(void (__fastcall **)(int *))(*v59 + 656))(v59);
return v9;
case 0xCAu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onGroupIDFilter((EditorUI *)this, nullptr);
return v9;
case 0xCBu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::onColorFilter((EditorUI *)this, nullptr);
return v9;
case 0xCCu:
case 0xCDu:
if ( !a3 )
return 1;
v48 = (GameManager *)GameManager::sharedState((GameManager *)this);
IntGameVariable = (GameManager *)GameManager::getIntGameVariable(v48, "0230");
v50 = IntGameVariable;
if ( (int)IntGameVariable <= 0 )
{
LABEL_173:
EditorUI::onFindObject((EditorUI *)this, nullptr);
return 1;
}
else
{
v51 = (GameManager *)GameManager::sharedState(IntGameVariable);
v52 = GameManager::getGameVariable(v51, "0232");
v53 = (int)v50;
if ( a2 == 20172 )
v54 = 1;
else
v54 = -1;
v9 = 1;
EditorUI::findObject((EditorUI *)this, v53, v52, v54);
}
return v9;
case 0xCEu:
case 0xCFu:
case 0xD0u:
case 0xD1u:
if ( !a3 )
return 1;
v9 = 1;
v10 = EditorUI::selectedMoveCommand((EditorUI *)this, a2 - 20174);
EditorUI::moveObjectCall(this, v10);
return v9;
case 0xD6u:
if ( !a3 )
return 1;
v63 = (GameManager *)GameManager::sharedState((GameManager *)this);
GameManager::toggleGameVariable(v63, "0242");
v83 = 0;
v84 = 0;
v85 = 0;
v64 = (GameManager *)std::string::__init(&v83, "Anchor Snap: ", 0xDu);
v65 = (GameManager *)GameManager::sharedState(v64);
v66 = GameManager::getGameVariable(v65, "0242");
EditorUI::showTextAlert((int)this, &v83, v66 ^ 1, 0, 0);
v9 = 1;
v67 = (EditorSFXManager *)std::string::~string((int)&v83);
v68 = (EditorSFXManager *)EditorSFXManager::sharedState(v67);
EditorSFXManager::playAction(v68, 189);
return v9;
case 0xD9u:
if ( !a3 )
return 1;
v46 = (cocos2d::CCArray *)EditorUI::getSelectedObjects((EditorUI *)this);
if ( !cocos2d::CCArray::count(v46) )
return 1;
EditorUI::getGroupCenter((EditorUI *)v82, (cocos2d::CCArray *)this, v46);
v9 = 1;
EditorUI::centerCameraOnPoint((cocos2d::CCDirector *)this, v82);
return v9;
case 0xDAu:
if ( !a3 )
return 1;
v28 = (GameManager *)GameManager::sharedState((GameManager *)this);
GameManager::toggleGameVariable(v28, "0248");
LevelEditorLayer::updateOptions((EditorUI **)*(this + 236));
v83 = 0;
v84 = 0;
v85 = 0;
v29 = (GameManager *)std::string::__init(&v83, "Center Cross: ", 0xEu);
v30 = (GameManager *)GameManager::sharedState(v29);
v31 = GameManager::getGameVariable(v30, "0248");
EditorUI::showTextAlert((int)this, &v83, v31 ^ 1, 0, 0);
v9 = 1;
v32 = (EditorSFXManager *)std::string::~string((int)&v83);
v33 = (EditorSFXManager *)EditorSFXManager::sharedState(v32);
EditorSFXManager::playAction(v33, 189);
return v9;
case 0xDBu:
if ( !a3 )
return 1;
v9 = 1;
EditorUI::editObjectOptions((EditorUI *)this, nullptr);
return v9;
default:
return 0;
}
}