add abr color dynamics
This commit is contained in:
14
src/node.cpp
14
src/node.cpp
@@ -94,7 +94,9 @@ kEventResult Node::on_event(Event* e)
|
||||
|
||||
if (current_mouse_capture)
|
||||
{
|
||||
if (e->m_cat == kEventCategory::MouseEvent && child_mouse_focus != current_mouse_capture)
|
||||
if (e->m_cat == kEventCategory::MouseEvent &&
|
||||
child_mouse_focus != current_mouse_capture &&
|
||||
is_child(current_mouse_capture))
|
||||
{
|
||||
MouseEvent* me = static_cast<MouseEvent*>(e);
|
||||
if (child_mouse_focus)
|
||||
@@ -432,6 +434,16 @@ bool Node::is_child_recursive(Node* o) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Node::is_child(Node* o) const
|
||||
{
|
||||
for (const auto& c : m_children)
|
||||
{
|
||||
if (c.get() == o)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Node::mouse_capture()
|
||||
{
|
||||
auto& c = root()->current_mouse_capture;
|
||||
|
||||
Reference in New Issue
Block a user