//
// HSVWidgetPopup::onClose from 0x140096920 to 0x1400969f3 (211 bytes)
//
// 5 xrefs:
// > HSVWidgetPopup::keyBackClicked @ 0x140096a09
// > HSVWidgetPopup::init @ 0x140096803
// > ??> @ 0x140669854
// > ??> @ 0x14066988c
// > ??> @ 0x1406c7284
//
// 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 HSVWidgetPopup::onClose(HSVWidgetPopup *a1, cocos2d::CCObject *a2)
{
cocos2d::CCDictionary *m_inputs; // rbx
cocos2d::CCDictElement *m_pElements; // rbx
cocos2d::CCDictElement *i; // rdi
_QWORD *v6; // rbx
ConfigureHSVWidget *m_widget; // rax
HSVWidgetDelegate *m_delegate; // rcx
cocos2d::ccHSVValue m_hsv; // xmm0
HSVWidgetDelegate_vtbl *v10; // rax
_BOOL8 v11; // rdx
cocos2d::ccHSVValue v12; // [rsp+20h] [rbp-18h] BYREF
m_inputs = a1->m_widget->m_inputs;
if ( m_inputs )
{
m_pElements = m_inputs->m_pElements;
if ( m_pElements )
{
for ( i = (cocos2d::CCDictElement *)m_pElements->hh.next; ; i = (cocos2d::CCDictElement *)i->hh.next )
{
v6 = &m_pElements->m_pObject->__vftable;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v6 + 1016LL))(v6, 0);
v6[70] = 0;
m_pElements = i;
if ( !i )
break;
}
}
}
m_widget = a1->m_widget;
if ( !m_widget->m_mixed )
{
m_delegate = a1->m_delegate;
if ( m_delegate )
{
m_hsv = m_widget->m_hsv;
v10 = m_delegate->__vftable;
v12 = m_hsv;
v10->hsvPopupClosed(m_delegate, a1, &v12);
}
}
a1->setKeypadEnabled(a1, 0);
LOBYTE(v11) = 1;
a1->removeFromParentAndCleanup(a1, v11);
}