Fixed child hover detection

This commit is contained in:
Yousef Khadadeh 2026-04-02 22:05:37 +03:00
parent 031c61146b
commit 451748c785
2 changed files with 17 additions and 3 deletions

View file

@ -379,8 +379,10 @@ void GUIManager::mouse_callback(const Vector2f& mousePos, const std::function<vo
cursorObstructed = true;
e->elem->mouseHovering = true;
Element* nextParent = e->elem->parent;
while(nextParent)
while(nextParent) {
nextParent->childMouseHovering |= true;
nextParent = nextParent->parent;
}
}
else
e->elem->mouseHovering = false;