testing color picker

This commit is contained in:
2019-03-03 23:09:43 +01:00
parent 91ce555c0a
commit 312cfe1ee2
10 changed files with 78 additions and 10 deletions

View File

@@ -41,6 +41,25 @@ void NodeColorPicker::handle_value_changed()
}
kEventResult NodeColorPicker::handle_event(Event* e)
{
switch (e->m_type)
{
case kEventType::MouseUpL:
if (!m_mouse_inside)
{
mouse_release();
parent->remove_child(this);
if (on_popup_close)
on_popup_close(this);
}
break;
default:
return kEventResult::Available;
break;
}
}
void NodeColorPicker::init_controls()
{
m_slider_h = find<NodeSliderH>("hsv-h");