//
// EditorUI::FLAlert_Clicked from 0x1400e6a50 to 0x1400e6c45 (501 bytes)
//
// 4 xrefs:
// > ??> @ 0x140552d98
// > ??> @ 0x14066ea54
// > ??> @ 0x14066ea64
// > ??> @ 0x1406c8d60
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void EditorUI::FLAlert_Clicked(EditorUI *a1, FLAlertLayer *a2, bool a3)
{
LevelEditorLayer *m_editModeBtn; // rsi
EditorUI *m_editorUI; // rcx
unsigned int v8; // eax
struct cocos2d::CCArray *v9; // rbx
_BOOL8 v10; // rdx
cocos2d::ccArray *data; // rdi
__int64 num; // rax
GameObject **arr; // rdi
GameObject **i; // rbp
GameObject *v15; // rbx
int v16; // eax
int v17; // eax
if ( a2->getTag(a2) == 122 )
{
LOBYTE(a1->m_pChildren) = 0;
}
else if ( a2->getTag(a2) == 125 )
{
LOBYTE(a1->m_pChildren) = 0;
if ( a3 )
*(_BYTE *)(*(_QWORD *)&a1->m_editModeBtn[4].m_fRotationX + 1184LL) = 1;
}
else if ( a2->getTag(a2) == 126 )
{
LOBYTE(a1->m_pChildren) = 0;
if ( a3 )
*(_BYTE *)(*(_QWORD *)&a1->m_editModeBtn[4].m_fRotationX + 1185LL) = 1;
}
else if ( a3 )
{
EditorUI::deselectAll((EditorUI *)((char *)a1 - 408));
m_editModeBtn = (LevelEditorLayer *)a1->m_editModeBtn;
m_editorUI = m_editModeBtn->m_editorUI;
m_editModeBtn->m_removingAll = 1;
if ( m_editorUI )
EditorUI::deselectAll(m_editorUI);
v8 = cocos2d::CCArray::count(m_editModeBtn->m_objects);
v9 = cocos2d::CCArray::createWithCapacity(v8);
cocos2d::CCArray::addObjectsFromArray(v9, m_editModeBtn->m_objects);
if ( v9 )
{
data = v9->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (GameObject **)data->arr;
for ( i = &arr[num - 1]; arr <= i; m_editModeBtn->m_unk3b22 = 1 )
{
v15 = *arr;
if ( !*arr )
break;
LOBYTE(v10) = 1;
v15->deactivateObject(*arr, v10);
GJBaseGameLayer::removeObjectFromSection(m_editModeBtn, v15);
LevelEditorLayer::removeSpecial(m_editModeBtn, v15);
++arr;
}
}
}
cocos2d::CCArray::removeAllObjects(m_editModeBtn->m_redoObjects);
cocos2d::CCArray::removeAllObjects(m_editModeBtn->m_undoObjects);
m_editModeBtn->m_objectCount.value = 0;
v16 = rand();
m_editModeBtn->m_unk3b22 = 1;
m_editModeBtn->m_removingAll = 0;
v17 = (int)(float)((float)((float)v16 / 32767.0) * 1000.0);
m_editModeBtn->m_objectCount.seed = v17;
m_editModeBtn->m_objectCount.random = v17;
}
}