//
// SetTextPopup::onClose from 0x1002af310 to 0x1002af3ce (190 bytes)
//
// 4 xrefs:
// > SetTextPopup::onCancel @ 0x1002af4ac
// > SetTextPopup::keyBackClicked @ 0x1002af6e5
// > sub_1002AF6F0 @ 0x1002af6fc
// > SetTextPopup::init @ 0x1002aed9d
//
// 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 SetTextPopup::onClose(SetTextPopup *a1, cocos2d::CCObject *a2)
{
double v2; // xmm0_8
CCTextInputNode *m_input; // rdi
SetTextPopupDelegate *m_delegate; // r14
__int128 v6; // [rsp+0h] [rbp-30h] BYREF
void *__p; // [rsp+10h] [rbp-20h]
m_input = a1->m_input;
m_input->m_delegate = nullptr;
((void (__fastcall *)(CCTextInputNode *, _QWORD))m_input->onClickTrackNode)(m_input, 0);
m_delegate = a1->m_delegate;
if ( m_delegate && !a1->m_cancelled )
{
if ( (a1->m_value.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(&v6, a1->m_value.m_data.m_long.longStorage, a1->m_value.m_data.m_long.size, v2);
}
else
{
__p = a1->m_value.m_data.m_long.longStorage;
v6 = *(_OWORD *)&a1->m_value.m_data.m_short.sizex2;
}
((void (__fastcall *)(SetTextPopupDelegate *, SetTextPopup *, __int128 *))m_delegate->setTextPopupClosed)(
m_delegate,
a1,
&v6);
if ( (v6 & 1) != 0 )
operator delete(__p);
}
((void (__fastcall *)(SetTextPopup *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(SetTextPopup *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}