16 |
/* along with this program; if not, write to the Free Software */ |
/* along with this program; if not, write to the Free Software */ |
17 |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
18 |
|
|
|
/* $Id$ */ |
|
|
|
|
19 |
#include <string.h> |
#include <string.h> |
20 |
#include <math.h> |
#include <math.h> |
21 |
#include <ctype.h> |
#include <ctype.h> |
64 |
{ |
{ |
65 |
size = GetClientSize(); |
size = GetClientSize(); |
66 |
|
|
67 |
board_size = size.GetWidth() < size.GetHeight() ? |
board_size = size.GetWidth() < size.GetHeight() ? |
68 |
size.GetWidth() : size.GetHeight(); |
size.GetWidth() : size.GetHeight(); |
69 |
|
|
70 |
tile_size = (int)((float)board_size / (float)(BOARD_SIZE)) - LINE_WIDTH; |
tile_size = (int)((float)board_size / (float)(BOARD_SIZE)) - LINE_WIDTH; |
186 |
wxCoord width, height; |
wxCoord width, height; |
187 |
wxCoord posx, posy; |
wxCoord posx, posy; |
188 |
|
|
189 |
// redraw borders |
// redraw borders |
190 |
if (row && column) |
if (row && column) |
191 |
dc->DrawRectangle(column*(tile_size+LINE_WIDTH) + TopLeft.x, |
dc->DrawRectangle(column*(tile_size+LINE_WIDTH) + TopLeft.x, |
192 |
row*(tile_size+LINE_WIDTH) + TopLeft.y, |
row*(tile_size+LINE_WIDTH) + TopLeft.y, |
208 |
dc->GetTextExtent(wxs,&width,&height); |
dc->GetTextExtent(wxs,&width,&height); |
209 |
posx = TopLeft.x + column*(tile_size+LINE_WIDTH) + LINE_WIDTH + |
posx = TopLeft.x + column*(tile_size+LINE_WIDTH) + LINE_WIDTH + |
210 |
(tile_size - width) / 2; |
(tile_size - width) / 2; |
211 |
posy = TopLeft.y + row*(tile_size+LINE_WIDTH) + LINE_WIDTH + |
posy = TopLeft.y + row*(tile_size+LINE_WIDTH) + LINE_WIDTH + |
212 |
(tile_size - height) / 2; |
(tile_size - height) / 2; |
213 |
dc->DrawText(wxs,posx,posy); |
dc->DrawText(wxs,posx,posy); |
214 |
} |
} |
239 |
wxColour colLx2 = config.getColour(wxString(BCOLOURLX2)); |
wxColour colLx2 = config.getColour(wxString(BCOLOURLX2)); |
240 |
|
|
241 |
wxPen *LinesPen = wxThePenList->FindOrCreatePen(colLines, 1, wxSOLID); |
wxPen *LinesPen = wxThePenList->FindOrCreatePen(colLines, 1, wxSOLID); |
242 |
wxBrush *BackgroundBrush = wxTheBrushList->FindOrCreateBrush(colBackground, |
wxBrush *BackgroundBrush = wxTheBrushList->FindOrCreateBrush(colBackground, |
243 |
wxSOLID); |
wxSOLID); |
244 |
|
|
245 |
wxBrush *Wx3Brush = wxTheBrushList->FindOrCreateBrush(colWx3, wxSOLID); |
wxBrush *Wx3Brush = wxTheBrushList->FindOrCreateBrush(colWx3, wxSOLID); |