aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/board/BoardCanvas.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-06 16:20:06 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-06 16:20:06 +0100
commita9eb4e05691feae5a417991e185dff5b459702a8 (patch)
tree980d11359eb27ec7f437749bf21388529d7a5301 /src/game_tab/left_panel/board/BoardCanvas.cpp
parent8703e306f7649dbff15eb0b5fe61ab7ee1423c01 (diff)
Add highlight types
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.cpp')
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.cpp b/src/game_tab/left_panel/board/BoardCanvas.cpp
index 7d6a27a..7bebe45 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.cpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.cpp
@@ -230,8 +230,22 @@ void BoardCanvas::DrawBoard(wxDC &dc) {
sfile = 7 - sfile;
}
if(srank == rank && sfile==file){
+ char type='a';
+ if(s.size()>2)
+ type=s[2];
+ // Default highlight (type='a' or something else not supported)
dc.SetPen(wxPen(*wxWHITE, 1));
- dc.SetBrush(wxColour(255,0,0,100));
+ dc.SetBrush(wxColour(255,0,0,110));
+ if(type=='b')
+ dc.SetBrush(wxColour(0,255,0,110));
+ else if(type=='c')
+ dc.SetBrush(wxColour(0,0,255,110));
+ else if(type=='d')
+ dc.SetBrush(wxColour(255,0,0,50));
+ else if(type=='e')
+ dc.SetBrush(wxColour(0,255,0,50));
+ else if(type=='f')
+ dc.SetBrush(wxColour(0,0,255,50));
dc.DrawRectangle(wxRect(x,y,square_width,square_width));
}
}