From a06124a5a9ab5bbfcc24651616808f516fcd01f1 Mon Sep 17 00:00:00 2001 From: ssccsscc Date: Sat, 23 Feb 2019 16:50:44 +0500 Subject: [PATCH] Fixed typo Fixed typo in function for detection mouse inside zoom --- src/gui/game/GameModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/game/GameModel.cpp b/src/gui/game/GameModel.cpp index e5d953cb2..2a41c8b60 100644 --- a/src/gui/game/GameModel.cpp +++ b/src/gui/game/GameModel.cpp @@ -783,7 +783,7 @@ bool GameModel::MouseInZoom(ui::Point position) ui::Point zoomWindowPosition = GetZoomWindowPosition(); ui::Point zoomWindowSize = ui::Point(GetZoomSize()*zoomFactor, GetZoomSize()*zoomFactor); - if (position.X >= zoomWindowPosition.X && position.X >= zoomWindowPosition.Y && position.X <= zoomWindowPosition.X+zoomWindowSize.X && position.Y <= zoomWindowPosition.Y+zoomWindowSize.Y) + if (position.X >= zoomWindowPosition.X && position.Y >= zoomWindowPosition.Y && position.X <= zoomWindowPosition.X+zoomWindowSize.X && position.Y <= zoomWindowPosition.Y+zoomWindowSize.Y) return true; return false; } @@ -797,7 +797,7 @@ ui::Point GameModel::AdjustZoomCoords(ui::Point position) ui::Point zoomWindowPosition = GetZoomWindowPosition(); ui::Point zoomWindowSize = ui::Point(GetZoomSize()*zoomFactor, GetZoomSize()*zoomFactor); - if (position.X >= zoomWindowPosition.X && position.X >= zoomWindowPosition.Y && position.X <= zoomWindowPosition.X+zoomWindowSize.X && position.Y <= zoomWindowPosition.Y+zoomWindowSize.Y) + if (position.X >= zoomWindowPosition.X && position.Y >= zoomWindowPosition.Y && position.X <= zoomWindowPosition.X+zoomWindowSize.X && position.Y <= zoomWindowPosition.Y+zoomWindowSize.Y) return ((position-zoomWindowPosition)/GetZoomFactor())+GetZoomPosition(); return position; }