diff --git a/Chess-Challenge/src/Framework/Application/UI/BoardTheme.cs b/Chess-Challenge/src/Framework/Application/UI/BoardTheme.cs index 181a67f..40eb0cb 100644 --- a/Chess-Challenge/src/Framework/Application/UI/BoardTheme.cs +++ b/Chess-Challenge/src/Framework/Application/UI/BoardTheme.cs @@ -23,6 +23,9 @@ namespace ChessChallenge.Application public Color CheckDark = new Color(207, 39, 39, 255); public Color BorderCol = new Color(44, 44, 44, 255); + + public Color LightCoordCol = new Color(255, 240, 220, 255); + public Color DarkCoordCol = new Color(140, 100, 80, 255); } } diff --git a/Chess-Challenge/src/Framework/Application/UI/BoardUI.cs b/Chess-Challenge/src/Framework/Application/UI/BoardUI.cs index c49668d..2c0e558 100644 --- a/Chess-Challenge/src/Framework/Application/UI/BoardUI.cs +++ b/Chess-Challenge/src/Framework/Application/UI/BoardUI.cs @@ -318,6 +318,23 @@ namespace ChessChallenge.Application { DrawPiece(piece, new Vector2((int)pos.X, (int)pos.Y), alpha); } + + int textSize = 25; + float xpadding = 5f, ypadding = 2f; + Color otherColor = coord.IsLightSquare() ? theme.DarkCoordCol : theme.LightCoordCol; + if (rank == 0) { + string fileLetter = "abcdefgh"[file].ToString(); + UIHelper.DrawText(fileLetter, + pos + new Vector2(xpadding, squareSize - ypadding), + textSize, 123, otherColor, + UIHelper.AlignH.Left, UIHelper.AlignV.Bottom); + } + if (file == 7) { + UIHelper.DrawText((rank + 1).ToString(), + pos + new Vector2(squareSize - xpadding, ypadding), + textSize, 123, otherColor, + UIHelper.AlignH.Right, UIHelper.AlignV.Top); + } } Vector2 GetSquarePos(int file, int rank, bool whitePerspective)