X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwoptions.c;h=a11fe551d3492b9b00d3862bfd00942121b9546e;hb=7570c887958cb7523dc6801bdeafff15acde5163;hp=0b46be0eda95f8dd764fb2f5220bbe97705945e4;hpb=e70077aab0199817f37aef9ed0bdba1bbca93b45;p=xboard.git diff --git a/winboard/woptions.c b/winboard/woptions.c index 0b46be0..a11fe55 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -516,7 +516,7 @@ BoardOptionsWhichRadio(HWND hDlg) LRESULT CALLBACK BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { - static Boolean mono, white, flip, fonts, bitmaps; + static Boolean mono, white, flip, fonts, bitmaps, grid; static BoardSize size; static COLORREF lsc, dsc, wpc, bpc, hsc, phc; static HBITMAP pieces[3]; @@ -599,6 +599,9 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if (appData.useFont) CheckDlgButton(hDlg, OPT_PieceFont, TRUE); + if (appData.overrideLineGap >= 0) + CheckDlgButton(hDlg, OPT_Grid, TRUE); + pieces[0] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "s"); pieces[1] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "w"); pieces[2] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "o"); @@ -615,6 +618,7 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) size = boardSize; bitmaps = appData.useBitmaps; fonts = appData.useFont; + grid = appData.overrideLineGap >= 0; SetBoardOptionEnables(hDlg); return TRUE; @@ -664,6 +668,7 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) (white != appData.allWhite) || (fonts != appData.useFont) || (bitmaps != appData.useBitmaps) || + (grid != appData.overrideLineGap >= 0) || (phc != premoveHighlightColor)) { lightSquareColor = lsc; @@ -677,6 +682,7 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) appData.upsideDown = flip; appData.useFont = fonts; appData.useBitmaps = bitmaps; + if(grid != appData.overrideLineGap >= 0) appData.overrideLineGap = grid - 1; InitDrawingColors(); InitDrawingSizes(boardSize, 0); @@ -782,6 +788,10 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case OPT_PieceFont: fonts = !fonts; break; + + case OPT_Grid: + grid = !grid; + break; } break; }