//
// SetIDPopup::onClose from 0x4a707a to 0x4a70e0 (102 bytes)
//
// 2 xrefs:
// > SetIDPopup::onCancel @ 0x4a70e8
// > SetIDPopup::keyBackClicked @ 0x4a70ee
//
// 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 SetIDPopup::onClose(SetIDPopup *a1, cocos2d::CCObject *a2)
{
int m_value; // r2
SetIDPopupDelegate *m_delegate; // r0
a1->m_inputNode->m_delegate = nullptr;
((void (__fastcall *)(CCTextInputNode *))a1->m_inputNode->onClickTrackNode)(a1->m_inputNode);
m_value = a1->m_value;
m_delegate = a1->m_delegate;
if ( m_value >= a1->m_maximum )
m_value = a1->m_maximum;
if ( m_value < a1->m_minimum )
m_value = a1->m_minimum;
a1->m_value = m_value;
if ( m_delegate && !a1->m_cancelled )
((void (__fastcall *)(SetIDPopupDelegate *, SetIDPopup *))m_delegate->setIDPopupClosed)(m_delegate, a1);
a1->setKeypadEnabled(a1, 0);
a1->removeFromParentAndCleanup(a1, 1);
}