//
// EditLevelLayer::FLAlert_Clicked from 0x3b80b0 to 0x3b8202 (338 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x3b8210
//
// 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 EditLevelLayer::FLAlert_Clicked(EditLevelLayer *a1, FLAlertLayer *a2, bool a3)
{
_BOOL4 v5; // r6
GameLevelManager *v6; // r0
int v7; // r6
GameLevelManager *v8; // r8
int updated; // r6
UploadActionPopup *m_descriptionPopup; // r2
std::string v11; // r2
GameManager *v12; // r0
UploadPopupDelegate v13; // [sp+8h] [bp-8h] BYREF
v13.__vftable = (UploadPopupDelegate_vtbl *)a3;
v5 = a3;
if ( a2->getTag(a2) == 4 && v5 )
{
EditLevelLayer::onDelete(a1);
return;
}
if ( a2->getTag(a2) == 7 && v5 )
{
EditLevelLayer::onClone(a1);
return;
}
if ( a2->getTag(a2) == 8 && v5 )
{
EditLevelLayer::onMoveToTop(a1);
return;
}
if ( a2->getTag(a2) == 10 )
{
EditLevelLayer::onShare(a1, nullptr);
return;
}
if ( a2->getTag(a2) == 5 )
{
if ( !v5 )
{
EditLevelLayer::onEdit(a1, nullptr);
return;
}
goto LABEL_24;
}
if ( a2->getTag(a2) == 9 && v5 )
{
EditLevelLayer::closeTextInputs(a1);
GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;
v6 = GameLevelManager::sharedState();
v7 = a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed;
v8 = v6;
sub_775C20(&v13, &a1->m_level->m_levelDesc);
updated = GameLevelManager::updateDescription(v8, v7, (std::string)&v13);
sub_774008(&v13);
if ( updated )
{
m_descriptionPopup = a1->m_descriptionPopup;
if ( m_descriptionPopup )
{
m_descriptionPopup->m_delegate = nullptr;
a1->m_descriptionPopup = nullptr;
}
sub_776584((int)&v13, "Updating description...");
a1->m_descriptionPopup = (UploadActionPopup *)UploadActionPopup::create(
(UploadActionPopup *)&a1->UploadPopupDelegate,
&v13,
v11);
sub_774008(&v13);
a1->m_descriptionPopup->show(a1->m_descriptionPopup);
}
}
else if ( a2->getTag(a2) == 6 && v5 )
{
LABEL_24:
v12 = GameManager::sharedState();
GameManager::openEditorGuide(v12);
}
}