Improve UI

This commit is contained in:
Loic Guegan 2022-12-30 16:16:41 +01:00
parent 2045a1250a
commit a762ff6521

View file

@ -204,9 +204,9 @@ void BoardCanvas::DrawBoard(wxDC &dc) {
// Draw numbers
dc.SetFont(wxFont(*wxNORMAL_FONT).MakeBold());
if(file==0){ // Right numbers
if(file==7){ // Right numbers
dc.DrawText(wxString((char)('1'+7-rank)),
x+square_width+numbers_size.x/2,y+square_width/2-numbers_size.y/2);
x-numbers_size.x*1.5,y+square_width/2-numbers_size.y/2);
}
if(rank==7){ // Bottom numbers
dc.DrawText(wxString((char)('a'+7-file)),
@ -252,7 +252,7 @@ void BoardCanvas::DrawBoard(wxDC &dc) {
badgeY = boardY + (8 * square_width) - badgeWidth;
}
}
wxRect badge(boardX + (8 * square_width) + badgeWidth, badgeY, badgeWidth,
wxRect badge(boardX + (8 * square_width) + badgeWidth/2, badgeY, badgeWidth,
badgeWidth);
dc.DrawRectangle(badge);