//
// HSVWidgetPopup::onClose from 0x1000fef14 to 0x1000fefc0 (172 bytes)
//
// 3 xrefs:
// > HSVWidgetPopup::keyBackClicked @ 0x1000ff080
// > sub_1000FF084 @ 0x1000ff088
// > HSVWidgetPopup::init @ 0x1000fee20
//
// 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 HSVWidgetPopup::onClose(HSVWidgetPopup *a1, cocos2d::CCObject *a2)
{
ConfigureHSVWidget *m_widget; // x8
cocos2d::CCDictionary *m_inputs; // x9
cocos2d::CCDictElement *m_pElements; // x9
cocos2d::CCDictElement *next; // x21
_QWORD *v7; // x20
HSVWidgetDelegate *m_delegate; // x0
m_widget = a1->m_widget;
m_inputs = m_widget->m_inputs;
if ( m_inputs )
{
m_pElements = m_inputs->m_pElements;
if ( m_pElements )
{
do
{
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
v7 = &m_pElements->m_pObject->__vftable;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v7 + 1144LL))(v7, 0);
v7[68] = 0;
m_pElements = next;
}
while ( next );
m_widget = a1->m_widget;
}
}
if ( !m_widget->m_mixed )
{
m_delegate = a1->m_delegate;
if ( m_delegate )
((void (__fastcall *)(HSVWidgetDelegate *, HSVWidgetPopup *, _QWORD, _QWORD))m_delegate->hsvPopupClosed)(
m_delegate,
a1,
*(_QWORD *)&m_widget->m_hsv.h,
*(_QWORD *)&m_widget->m_hsv.v);
}
((void (__fastcall *)(HSVWidgetPopup *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(HSVWidgetPopup *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}