Fixed typo
Fixed typo in function for detection mouse inside zoom
This commit is contained in:
parent
1355a4363e
commit
a06124a5a9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user