Skip to content

Commit

Permalink
Fix bug where the cell cursor of "Change techno owner" action did not…
Browse files Browse the repository at this point in the history
… scale with zoom level
  • Loading branch information
Rampastring committed Aug 6, 2023
1 parent 4af870c commit a9d0610
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TSMapEditor/UI/CursorActions/ChangeTechnoOwnerAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a9d0610

Please sign in to comment.