From a9d0610951302513b9a84fe369767e49003931ce Mon Sep 17 00:00:00 2001 From: Rampastring Date: Sun, 6 Aug 2023 11:54:22 +0300 Subject: [PATCH] Fix bug where the cell cursor of "Change techno owner" action did not scale with zoom level --- src/TSMapEditor/UI/CursorActions/ChangeTechnoOwnerAction.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TSMapEditor/UI/CursorActions/ChangeTechnoOwnerAction.cs b/src/TSMapEditor/UI/CursorActions/ChangeTechnoOwnerAction.cs index 6034d8d7..3228da5e 100644 --- a/src/TSMapEditor/UI/CursorActions/ChangeTechnoOwnerAction.cs +++ b/src/TSMapEditor/UI/CursorActions/ChangeTechnoOwnerAction.cs @@ -29,7 +29,9 @@ public override void DrawPreview(Point2D cellCoords, Point2D cameraTopLeftPoint) Renderer.DrawTexture( CursorActionTarget.EditorGraphics.GenericTileTexture, - new Rectangle(cellTopLeftPoint.X, cellTopLeftPoint.Y, Constants.CellSizeX, Constants.CellSizeY), + new Rectangle(cellTopLeftPoint.X, cellTopLeftPoint.Y, + CursorActionTarget.Camera.ScaleIntWithZoom(Constants.CellSizeX), + CursorActionTarget.Camera.ScaleIntWithZoom(Constants.CellSizeY)), newOwner.XNAColor * 0.5f); if (tile.HasTechnoThatPassesCheck(techno => techno.Owner != newOwner))