//
// OptionsScrollLayer::onClose from 0x14033af90 to 0x14033b019 (137 bytes)
//
// 3 xrefs:
// > OptionsScrollLayer::keyBackClicked @ 0x14033b029
// > OptionsScrollLayer::create @ 0x14033acd8
// > ??> @ 0x1406d5468
//
// 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 OptionsScrollLayer::onClose(OptionsScrollLayer *a1, cocos2d::CCObject *a2)
{
_BOOL8 v2; // r8
__int64 v4; // rax
cocos2d::CCTouchDispatcher *v5; // rax
FLAlertLayerProtocol *m_alertProtocol; // rcx
_BOOL8 v7; // rdx
if ( a1->m_listLayer )
{
v4 = cocos2d::CCDirector::sharedDirector(a1);
v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 144LL))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1->m_listLayer);
a1->m_listLayer->removeMeAndCleanup(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
m_alertProtocol = a1->m_alertProtocol;
if ( m_alertProtocol )
{
LOBYTE(v2) = 1;
m_alertProtocol->FLAlert_Clicked(m_alertProtocol, a1, v2);
}
a1->setKeypadEnabled(a1, 0);
LOBYTE(v7) = 1;
a1->removeFromParentAndCleanup(a1, v7);
}