implement animation panel interaction

This commit is contained in:
2019-10-17 20:42:52 +02:00
parent 62863e7224
commit 7487feb168
14 changed files with 399 additions and 16 deletions

View File

@@ -114,7 +114,9 @@ kEventResult NodePanelFloating::handle_event(Event* e)
m_outline->SetPosition(m_parent->m_pos + m_drag_start_pos + me->m_pos - m_drag_start_cur);
m_outline->SetSize(GetSize());
auto nodes = root()->find("ui-root")->get_children_at_point(me->m_pos);
std::vector<std::shared_ptr<Node>> nodes;
if (auto uir = root()->find("ui-root"))
nodes = uir->get_children_at_point(me->m_pos);
bool docked = false;
for (auto const& c : nodes)
{
@@ -181,7 +183,9 @@ kEventResult NodePanelFloating::handle_event(Event* e)
m_drop_placeholder->destroy();
m_drop_placeholder->remove_from_parent();
}
auto nodes = root()->find("ui-root")->get_children_at_point(me->m_pos);
std::vector<std::shared_ptr<Node>> nodes;
if (auto uir = root()->find("ui-root"))
nodes = uir->get_children_at_point(me->m_pos);
bool docked = false;
auto ref = m_parent->m_children[m_parent->get_child_index(this)];
for (auto const& c : nodes)