remove sidebar and make panels popup
This commit is contained in:
@@ -53,6 +53,26 @@ void NodePanelColor::set_color(glm::vec3 rgb)
|
||||
m_base_color = glm::vec4(rgb, 1);
|
||||
}
|
||||
|
||||
kEventResult NodePanelColor::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;
|
||||
}
|
||||
return kEventResult::Available;
|
||||
}
|
||||
|
||||
void NodePanelColor::added(Node* parent)
|
||||
{
|
||||
set_color(Canvas::I->m_current_brush->m_tip_color);
|
||||
|
||||
Reference in New Issue
Block a user