//
// SetupSmartTemplateLayer::onClick from 0x540130 to 0x5401dc (172 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 SetupSmartTemplateLayer::onClick(SetupSmartTemplateLayer *a1, cocos2d::CCObject *a2)
{
int v3; // r0
BrowseSmartTemplateLayer *v4; // r0
FLAlertLayer *v5; // r5
SmartBrowseFilter v6; // [sp+10h] [bp-8h] BYREF
v3 = a2->getTag(a2);
if ( v3 )
{
if ( v3 == 5 )
{
sub_776584((int)&v6, "Are you sure you want to delete this template?");
v5 = FLAlertLayer::create(
(int)&a1->FLAlertLayerProtocol,
(int)"Delete Template",
(int)&v6,
(int)"NO",
(int)"YES",
300.0);
sub_774008(&v6);
v5->setTag(v5, 5);
v5->show(v5);
}
}
else
{
LOWORD(v6) = 0;
BYTE2(v6) = 0;
v4 = BrowseSmartTemplateLayer::create(a1->m_smartTemplate, v6);
v4->show(v4);
SetupSmartTemplateLayer::onClose(a1, nullptr);
}
}