//
// EditorUI::onDeleteSelected from 0x3a4558 to 0x3a4620 (200 bytes)
//
// 1 xrefs:
// > EditorUI::keyDown @ 0x3a6eb4
//
// 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::onDeleteSelected(EditorUI *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *v3; // r0
unsigned int v4; // r5
cocos2d::CCArray *v5; // r6
GameObject *v6; // r7
unsigned int v7; // r5
int v8; // r7
unsigned int v9; // r1
GameObject *v10; // r1
UndoObject *v11; // r0
GameObject *m_selectedObject; // r1
v3 = (cocos2d::CCArray *)cocos2d::CCArray::count(a1->m_selectedObjects);
if ( v3 )
{
v4 = 0;
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
while ( v4 < cocos2d::CCArray::count(a1->m_selectedObjects) )
{
v6 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v4);
if ( EditorUI::shouldDeleteObject(a1, v6) )
cocos2d::CCArray::addObject(v5, v6);
++v4;
}
v7 = 0;
v8 = 0;
while ( v7 < cocos2d::CCArray::count(v5) )
{
v9 = v7++;
v10 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, v9);
if ( v10->m_objectID == 747 )
v8 = 1;
EditorUI::deleteObject(a1, v10, 1);
}
v11 = UndoObject::createWithArray(v5, DeleteMulti);
LevelEditorLayer::addToUndoList(a1->m_editorLayer, v11, 0);
if ( v8 )
EditorUI::deselectTargetPortals(a1);
}
else
{
m_selectedObject = a1->m_selectedObject;
if ( m_selectedObject && EditorUI::shouldDeleteObject(a1, m_selectedObject) )
EditorUI::deleteObject(a1, a1->m_selectedObject, 0);
}
EditorUI::updateSpecialUIElements(a1);
EditorUI::updateButtons(a1);
EditorUI::tryUpdateTimeMarkers(a1);
}