//
// EditorUI::onDeleteCustomItem from 0x100031470 to 0x100031501 (145 bytes)
//
// 1 xrefs:
// > EditorUI::createCustomItems @ 0x100031957
//
// 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 __fastcall EditorUI::onDeleteCustomItem(EditorUI *a1, cocos2d::CCObject *a2)
{
GameManager *v2; // rax
GameManager *v3; // rax
int IntGameVariable; // r14d
GameManager *v5; // rax
int v6; // r15d
EditButtonBar *m_customTabBar; // r12
cocos2d::CCArray *CustomItems; // rax
if ( a1->m_selectedObjectIndex < 0 )
{
v2 = GameManager::sharedState();
GameManager::removeCustomObject(v2, a1->m_selectedObjectIndex);
a1->m_selectedObjectIndex = 0;
v3 = GameManager::sharedState();
IntGameVariable = GameManager::getIntGameVariable(v3, "0049");
v5 = GameManager::sharedState();
v6 = GameManager::getIntGameVariable(v5, "0050");
m_customTabBar = a1->m_customTabBar;
CustomItems = EditorUI::createCustomItems(a1);
EditButtonBar::loadFromItems(m_customTabBar, CustomItems, IntGameVariable, v6, 1);
}
}