rename UINode::setHover to UINode::setMouseEnter

This commit is contained in:
MihailRis 2025-12-10 20:51:24 +03:00
parent 79e4a28b4d
commit 89be2a1837
3 changed files with 5 additions and 5 deletions

View file

@ -133,10 +133,10 @@ void GUI::actMouse(float delta, const CursorState& cursor) {
auto hover = container->getAt(cursor.pos); auto hover = container->getAt(cursor.pos);
if (this->hover && this->hover != hover) { if (this->hover && this->hover != hover) {
this->hover->setHover(false); this->hover->setMouseEnter(false);
} }
if (hover && hover != this->hover) { if (hover && hover != this->hover) {
hover->setHover(true); hover->setMouseEnter(true);
int scroll = input.getScroll(); int scroll = input.getScroll();
if (scroll) { if (scroll) {
@ -241,7 +241,7 @@ void GUI::act(float delta, const glm::uvec2& vp) {
actMouse(delta, cursor); actMouse(delta, cursor);
} else { } else {
if (hover) { if (hover) {
hover->setHover(false); hover->setMouseEnter(false);
hover = nullptr; hover = nullptr;
} }
} }

View file

@ -47,7 +47,7 @@ void UINode::setAlign(Align align) {
this->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); actions.notify(flag ? UIAction::MOUSE_ENTER : UIAction::MOUSE_LEAVE, gui);
} }

View file

@ -169,7 +169,7 @@ namespace gui {
virtual void setAlign(Align align); virtual void setAlign(Align align);
Align getAlign() const; Align getAlign() const;
virtual void setHover(bool flag); virtual void setMouseEnter(bool flag);
bool isHover() const; bool isHover() const;
void setMouseOver(bool flag); void setMouseOver(bool flag);