//
// EditorUI::editHSV from 0x14011f010 to 0x14011f1ea (474 bytes)
//
// 3 xrefs:
// > EditorUI::checkLiveColorSelect @ 0x140110668
// > EditorUI::onEditColor @ 0x14011eac9
// > ??> @ 0x1406c951c
//
// 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
//
// Hidden C++ exception states: #wind=1
void EditorUI::editHSV(EditorUI *a1)
{
cocos2d::CCArray *SelectedObjects; // rbp
GameObject *m_selectedObject; // rcx
cocos2d::CCArray *m_selectedObjects; // rcx
cocos2d::ccArray *data; // rbx
__int64 num; // rcx
GameObject **arr; // rbx
GameObject **i; // rdi
GameObject *v9; // rcx
GameObject *v10; // rbx
HSVLiveOverlay *v11; // rdi
EditorUI::closeLiveHSVSelect(a1);
EditorUI::closeLiveColorSelect(a1);
SelectedObjects = nullptr;
m_selectedObject = a1->m_selectedObject;
if ( m_selectedObject )
{
m_selectedObject->m_isSelected = 0;
GameObject::updateObjectEditorColor(m_selectedObject);
}
else
{
SelectedObjects = EditorUI::getSelectedObjects(a1);
m_selectedObjects = a1->m_selectedObjects;
if ( m_selectedObjects )
{
data = m_selectedObjects->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (GameObject **)data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v9 = *arr;
if ( !*arr )
break;
v9->m_isSelected = 0;
GameObject::updateObjectEditorColor(v9);
}
}
}
}
v10 = a1->m_selectedObject;
v11 = (HSVLiveOverlay *)operator new(0x2C0u);
FLAlertLayer::FLAlertLayer(v11);
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (HSVLiveOverlay_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&HSVLiveOverlay::`vftable';
v11->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&HSVLiveOverlay::`vftable';
v11->HSVWidgetDelegate::__vftable = (HSVWidgetDelegate_vtbl *)&HSVLiveOverlay::`vftable';
v11->m_object = nullptr;
v11->m_objects = nullptr;
v11->m_unkArray = nullptr;
v11->m_delegate = nullptr;
v11->m_activeTab = -1;
v11->m_widget = nullptr;
*(_WORD *)&v11->m_unkBool1 = 0;
v11->m_unkBool3 = 0;
if ( HSVLiveOverlay::init(v11, v10, SelectedObjects) )
{
cocos2d::CCObject::autorelease(v11);
}
else
{
((void (__fastcall *)(HSVLiveOverlay *, __int64))v11->~HSVLiveOverlay)(v11, 1);
v11 = nullptr;
}
a1->m_hsvOverlay = v11;
v11->m_delegate = &a1->ColorSelectDelegate;
a1->m_hsvOverlay->m_scene = a1;
a1->m_hsvOverlay->show(a1->m_hsvOverlay);
}