//
// SetIDPopup::onClose from 0x14029c050 to 0x14029c0e4 (148 bytes)
//
// 3 xrefs:
// > SetIDPopup::keyBackClicked @ 0x14029c0f9
// > SetIDPopup::init @ 0x14029b678
// > ??> @ 0x1406d1de4
//
// 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_maximum; // r8d
SetIDPopupDelegate *m_delegate; // rcx
_BOOL8 v5; // rdx
a1->m_inputNode->m_delegate = nullptr;
a1->m_inputNode->onClickTrackNode(a1->m_inputNode, 0);
m_maximum = a1->m_maximum;
m_delegate = a1->m_delegate;
if ( m_maximum >= a1->m_value )
m_maximum = a1->m_value;
if ( a1->m_minimum > m_maximum )
m_maximum = a1->m_minimum;
a1->m_value = m_maximum;
if ( m_delegate && !a1->m_cancelled )
((void (__fastcall *)(SetIDPopupDelegate *, SetIDPopup *))m_delegate->setIDPopupClosed)(m_delegate, a1);
a1->setKeypadEnabled(a1, 0);
LOBYTE(v5) = 1;
a1->removeFromParentAndCleanup(a1, v5);
}