From 2306b6e9f5984d5fbd2f53e1c49ea92813158831 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Tue, 5 May 2026 02:49:29 +0200 Subject: [PATCH] Change saturation of zone rectangles and outline weighted cells when zones visible --- .../LargeGridPathfindingGame.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/LargeGridPathfinding/LargeGridPathfindingGame.cs b/src/LargeGridPathfinding/LargeGridPathfindingGame.cs index 7b19b3f..916c2ca 100644 --- a/src/LargeGridPathfinding/LargeGridPathfindingGame.cs +++ b/src/LargeGridPathfinding/LargeGridPathfindingGame.cs @@ -461,7 +461,8 @@ public class LargeGridPathfindingGame : Game { Color color = colorLookup[label % 28]; - spriteBatch.FillRectangle(new Rectangle(rectangle.X * 10, rectangle.Y * 10, rectangle.Width * 10, rectangle.Height * 10), color, layerDepth: 0.2f); + spriteBatch.FillRectangle(new Rectangle(rectangle.X * 10, rectangle.Y * 10, rectangle.Width * 10, rectangle.Height * 10), Color.Lerp(color, Color.Gray, 0.55f), layerDepth: 0.2f); + } } @@ -479,7 +480,15 @@ public class LargeGridPathfindingGame : Game { float blendFactor = Math.Clamp((cellWeight - 1) / 8f, 0f, 1f); Color weightColor = Color.Lerp(Color.LightYellow, Color.DarkOrange, blendFactor); - spriteBatch.FillRectangle(cellRect, weightColor * 0.75f, layerDepth: 0.25f); + + if (showZones) + { + spriteBatch.DrawRectangle(cellRect, weightColor * 0.75f, layerDepth: 0.25f); + } + else + { + spriteBatch.FillRectangle(cellRect, weightColor * 0.75f, layerDepth: 0.25f); + } } if (cellValue < 0)