From b03dd98209debcd6f569cd20fe5739e4e3ee0486 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 11 Dec 2025 21:56:38 +0300 Subject: [PATCH] fix scrolling --- src/graphics/ui/GUI.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/graphics/ui/GUI.cpp b/src/graphics/ui/GUI.cpp index 5fa617bda..b6cc13dcc 100644 --- a/src/graphics/ui/GUI.cpp +++ b/src/graphics/ui/GUI.cpp @@ -135,9 +135,10 @@ void GUI::actMouse(float delta, const CursorState& cursor) { if (this->hover && this->hover != hover) { this->hover->setMouseEnter(false); } - if (hover && hover != this->hover) { - hover->setMouseEnter(true); - + if (hover) { + if (hover != this->hover) { + hover->setMouseEnter(true); + } int scroll = input.getScroll(); if (scroll) { hover->scrolled(scroll); @@ -269,7 +270,7 @@ void GUI::draw(const DrawContext& pctx, const Assets& assets) { auto& page = menu->getCurrent(); if (page.panel) { menu->setSize(page.panel->getSize()); - page.panel->refresh(); + // page.panel->refresh(); if (auto panel = std::dynamic_pointer_cast(page.panel)) { panel->cropToContent(); }