From b9c480e97e35b94a49e8e11c33f1b65f9573732d Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 31 Aug 2025 15:05:32 -0500 Subject: [PATCH] fix change cursor when hovering field --- src/dialogxml/dialogs/dialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dialogxml/dialogs/dialog.cpp b/src/dialogxml/dialogs/dialog.cpp index b6fc3a6d..bf75e705 100644 --- a/src/dialogxml/dialogs/dialog.cpp +++ b/src/dialogxml/dialogs/dialog.cpp @@ -800,6 +800,8 @@ void cDialog::handle_one_event(const sf::Event& currentEvent, cFramerateLimiter& } BOOST_FALLTHROUGH; case sf::Event::MouseMoved:{ + int x = currentEvent.mouseMove.x / get_ui_scale(); + int y = currentEvent.mouseMove.y / get_ui_scale(); // Did the window move, potentially dirtying the canvas below it? if(check_window_moved(win, winLastX, winLastY)) if (redraw_everything != NULL) @@ -807,7 +809,7 @@ void cDialog::handle_one_event(const sf::Event& currentEvent, cFramerateLimiter& bool inField = false; for(auto& ctrl : controls) { - if(ctrl.second->getType() == CTRL_FIELD && ctrl.second->getBounds().contains(currentEvent.mouseMove.x, currentEvent.mouseMove.y)) { + if(ctrl.second->getType() == CTRL_FIELD && ctrl.second->getBounds().contains(x, y)) { set_cursor(text_curs); inField = true; break;