From 89be2a1837ebdfab4ba968bfde6de1cb5d31b975 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 10 Dec 2025 20:51:24 +0300 Subject: [PATCH] rename UINode::setHover to UINode::setMouseEnter --- src/graphics/ui/GUI.cpp | 6 +++--- src/graphics/ui/elements/UINode.cpp | 2 +- src/graphics/ui/elements/UINode.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/graphics/ui/GUI.cpp b/src/graphics/ui/GUI.cpp index 48408a5a7..5fa617bda 100644 --- a/src/graphics/ui/GUI.cpp +++ b/src/graphics/ui/GUI.cpp @@ -133,10 +133,10 @@ void GUI::actMouse(float delta, const CursorState& cursor) { auto hover = container->getAt(cursor.pos); if (this->hover && this->hover != hover) { - this->hover->setHover(false); + this->hover->setMouseEnter(false); } if (hover && hover != this->hover) { - hover->setHover(true); + hover->setMouseEnter(true); int scroll = input.getScroll(); if (scroll) { @@ -241,7 +241,7 @@ void GUI::act(float delta, const glm::uvec2& vp) { actMouse(delta, cursor); } else { if (hover) { - hover->setHover(false); + hover->setMouseEnter(false); hover = nullptr; } } diff --git a/src/graphics/ui/elements/UINode.cpp b/src/graphics/ui/elements/UINode.cpp index 117d394f5..465ff26e4 100644 --- a/src/graphics/ui/elements/UINode.cpp +++ b/src/graphics/ui/elements/UINode.cpp @@ -47,7 +47,7 @@ void UINode::setAlign(Align align) { this->align = align; } -void UINode::setHover(bool flag) { +void UINode::setMouseEnter(bool flag) { actions.notify(flag ? UIAction::MOUSE_ENTER : UIAction::MOUSE_LEAVE, gui); } diff --git a/src/graphics/ui/elements/UINode.hpp b/src/graphics/ui/elements/UINode.hpp index f1c378fa1..fb699a737 100644 --- a/src/graphics/ui/elements/UINode.hpp +++ b/src/graphics/ui/elements/UINode.hpp @@ -169,7 +169,7 @@ namespace gui { virtual void setAlign(Align align); Align getAlign() const; - virtual void setHover(bool flag); + virtual void setMouseEnter(bool flag); bool isHover() const; void setMouseOver(bool flag);