//
// LevelBrowserLayer::onDeleteSelected from 0x3baa50 to 0x3bab80 (304 bytes)
//
// 0 xrefs:
//
// 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 LevelBrowserLayer::onDeleteSelected(LevelBrowserLayer *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *m_levels; // r0
cocos2d::CCArray *v4; // r3
cocos2d::ccArray *data; // r2
unsigned int num; // r3
cocos2d::CCObject **arr; // r2
const char *v8; // r1
cocos2d::CCObject **v9; // r3
int v10; // r0
int v11; // t1
FLAlertLayer *v12; // r6
cocos2d::CCString *v13; // r0
char *CString; // r0
FLAlertLayer *v15; // r5
char *v16; // [sp+1Ch] [bp-10h] BYREF
char v17[4]; // [sp+20h] [bp-Ch] BYREF
m_levels = a1->m_levels;
if ( m_levels && cocos2d::CCArray::count(m_levels) )
{
v4 = a1->m_levels;
if ( !v4 )
goto LABEL_11;
data = v4->data;
num = data->num;
if ( !data->num )
goto LABEL_11;
arr = data->arr;
v8 = nullptr;
v9 = &arr[num] + 0x3FFFFFFF;
while ( arr <= v9 )
{
v11 = (int)*arr++;
v10 = v11;
if ( !v11 )
break;
if ( *(_BYTE *)(v10 + 411) )
++v8;
}
if ( v8 )
{
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Are you sure you want to delete the %i selected levels?",
v8,
arr);
CString = (char *)cocos2d::CCString::getCString(v13);
sub_776584((int)&v16, CString);
sub_776584((int)v17, v16);
v15 = FLAlertLayer::create(
(int)&a1->FLAlertLayerProtocol,
(int)"Delete",
(int)v17,
(int)"Back",
(int)"Delete",
380.0,
0,
0,
1.0);
sub_774008(v17);
ButtonSprite::updateBGImage(v15->m_button2, "GJ_button_06.png");
v15->setTag(v15, 5);
v15->show(v15);
sub_774008(&v16);
}
else
{
LABEL_11:
sub_776584((int)v17, "No levels selected.");
v12 = FLAlertLayer::create(0, (int)"Nothing here...", (int)v17, (int)"OK", 0);
sub_774008(v17);
v12->show(v12);
}
}
}