//
// EditorUI::handleAction from 0xbd88f0 to 0xbd8bb8 (712 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'EditorUI::handleAction @ 0xbd8bbc
// > ??> @ 0xe2e88
// > ??> @ 0x1437290
//
// 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:03:41 +0000
//
__int64 __fastcall EditorUI::handleAction(EditorUI *this, int a2, unsigned __int8 a3, long double a4)
{
__int64 v6; // x0
char v8; // w0
int v9; // w1
long double v10; // q0
unsigned __int64 v11; // x0
int v12; // w1
long double v13; // q0
__int64 v14; // x0
__int64 v15; // x0
__int64 v16; // x0
int v17; // w19
char v18; // w0
long double v19; // [xsp+20h] [xbp+20h]
long double v20; // [xsp+20h] [xbp+20h]
long double v21; // [xsp+20h] [xbp+20h]
int v22; // [xsp+38h] [xbp+38h]
int v23; // [xsp+38h] [xbp+38h]
int v24; // [xsp+38h] [xbp+38h]
if ( !a3 )
{
switch ( a2 )
{
case 20067:
case 20068:
case 20087:
return 1;
case 20069:
goto LABEL_20;
default:
goto LABEL_3;
}
}
v22 = a2;
v19 = a4;
v8 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 98) + 352LL))(*((_QWORD *)this + 98));
v9 = v22;
v10 = v19;
if ( v8 )
{
v18 = GJScaleControl::applyFocusedInput(*((GJScaleControl **)this + 98));
v9 = v22;
v10 = v19;
if ( v18 )
return 1;
}
v23 = v9;
v20 = v10;
v11 = (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 95) + 352LL))(*((_QWORD *)this + 95));
v12 = v23;
v13 = v20;
if ( (_BYTE)v11 )
{
v11 = (unsigned __int8)GJRotationControl::applyFocusedInput(*((GJRotationControl **)this + 95));
v12 = v23;
v13 = v20;
if ( (_BYTE)v11 )
return 1;
}
v21 = v13;
v24 = v12;
v14 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v11);
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 192LL))(v14);
a2 = v24;
a4 = v21;
if ( !*(_BYTE *)(v15 + 133) )
{
switch ( v24 )
{
case 20067:
EditorUI::onPause(this, nullptr);
return 1;
case 20068:
if ( *(_DWORD *)(*((_QWORD *)this + 180) + 1972LL) )
{
EditorUI::onStopPlaytest((UILayer ***)this, nullptr);
return 1;
}
else
{
if ( *((_DWORD *)this + 176) != -1 )
return 1;
EditorUI::onPlaytest(this, nullptr);
return 1;
}
case 20069:
LABEL_20:
*((_BYTE *)this + 688) = a3;
goto LABEL_3;
case 20087:
v16 = *((_QWORD *)this + 180);
v17 = *(_DWORD *)(v16 + 1972);
if ( v17 == 1 )
{
LevelEditorLayer::onPausePlaytest((cocos2d::CCNode **)v16);
return 1;
}
if ( v17 == 2 )
LevelEditorLayer::onResumePlaytest((cocos2d::CCNode **)v16);
break;
default:
goto LABEL_3;
}
return 1;
}
if ( v24 > 20066 )
{
if ( v24 <= 20115 )
{
if ( v24 >= 20114 || (unsigned int)(v24 - 20095) <= 0xF )
goto LABEL_3;
return 1;
}
if ( (unsigned int)(v24 - 20174) > 7 )
return 1;
}
else if ( v24 < 20063 )
{
if ( v24 <= 20034 )
{
if ( v24 >= 20031 || (unsigned int)(v24 - 20001) <= 1 )
goto LABEL_3;
return 1;
}
if ( (unsigned int)(v24 - 20041) > 7 )
return 1;
}
LABEL_3:
v6 = *((_QWORD *)this + 180);
if ( *(_DWORD *)(v6 + 1972) == 1 )
return (*(unsigned __int8 (__fastcall **)(_QWORD, long double))(**(_QWORD **)(v6 + 13288) + 1312LL))(
*(_QWORD *)(v6 + 13288),
a4);
else
return EditorUI::handleEditorAction(this, a2, a3, *(double *)&a4);
}