Make it a checkbox to choose between 0 and -1.
"Monochrome" === ""\r
"All White" === ""\r
"Flip Black" === ""\r
+"Use Board Textures" === ""\r
+"Use Piece Font" === ""\r
+"Suppress Grid" === ""\r
"Size" === ""\r
\r
BOARD SIZES (translate as number?)\r
#define OPT_SamplePieceFont 1979\r
#define OPT_ChoosePieceFont 1980\r
#define OPT_GameListFind 1981\r
+#define OPT_Grid 1983\r
\r
\r
// Next default values for new objects\r
OPT_ChooseLightSquareColor, OPT_ChooseDarkSquareColor, OPT_ChooseWhitePieceColor,\r
OPT_ChooseBlackPieceColor, OPT_ChooseHighlightSquareColor, OPT_ChoosePremoveHighlightColor,\r
OPT_Monochrome, OPT_AllWhite, OPT_UpsideDown, OPT_DefaultBoardColors, GPB_Colors,\r
- IDC_Light, IDC_Dark, IDC_White, IDC_Black, IDC_High, IDC_PreHigh, GPB_Size, OPT_Bitmaps, OPT_PieceFont }, \r
+ IDC_Light, IDC_Dark, IDC_White, IDC_Black, IDC_High, IDC_PreHigh, GPB_Size, OPT_Bitmaps, OPT_PieceFont, OPT_Grid }, \r
{ DLG_NewVariant, IDOK, IDCANCEL, OPT_VariantNormal, OPT_VariantFRC, OPT_VariantWildcastle,\r
OPT_VariantNocastle, OPT_VariantLosers, OPT_VariantGiveaway, OPT_VariantSuicide,\r
OPT_Variant3Check, OPT_VariantTwoKings, OPT_VariantAtomic, OPT_VariantCrazyhouse,\r
WS_TABSTOP,140,203,73,10\r
CONTROL "Use Piece Font",OPT_PieceFont,"Button",BS_AUTOCHECKBOX | \r
WS_TABSTOP,140,215,73,10\r
+ CONTROL "Suppress Grid",OPT_Grid,"Button",BS_AUTOCHECKBOX | \r
+ WS_TABSTOP,140,227,73,10\r
PUSHBUTTON "Defaults",OPT_DefaultBoardColors,80,206,50,15\r
EDITTEXT OPT_DarkSquareColor,80,112,25,15,ES_READONLY | \r
WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP\r
WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP\r
EDITTEXT OPT_HighlightSquareColor,80,166,25,15,ES_READONLY | \r
WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP\r
- GROUPBOX "Colors",GPB_Colors,4,84,215,142\r
+ GROUPBOX "Colors",GPB_Colors,4,84,215,154\r
EDITTEXT OPT_PremoveHighlightColor,80,184,25,15,ES_READONLY | \r
WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP\r
LTEXT "Light Squares",IDC_Light,10,98,60,10\r
WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP\r
EDITTEXT OPT_SampleDarkSquare,144,138,39,36,ES_READONLY | \r
WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP\r
- DEFPUSHBUTTON "OK",IDOK,84,232,50,14\r
- PUSHBUTTON "Cancel",IDCANCEL,140,232,50,14\r
+ DEFPUSHBUTTON "OK",IDOK,84,244,50,14\r
+ PUSHBUTTON "Cancel",IDCANCEL,140,244,50,14\r
END\r
\r
DLG_NewVariant DIALOG DISCARDABLE 0, 0, 224, 250\r
LRESULT CALLBACK\r
BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
- static Boolean mono, white, flip, fonts, bitmaps;\r
+ static Boolean mono, white, flip, fonts, bitmaps, grid;\r
static BoardSize size;\r
static COLORREF lsc, dsc, wpc, bpc, hsc, phc;\r
static HBITMAP pieces[3];\r
if (appData.useFont)\r
CheckDlgButton(hDlg, OPT_PieceFont, TRUE);\r
\r
+ if (appData.overrideLineGap >= 0)\r
+ CheckDlgButton(hDlg, OPT_Grid, TRUE);\r
+\r
pieces[0] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "s");\r
pieces[1] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "w");\r
pieces[2] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "o");\r
size = boardSize;\r
bitmaps = appData.useBitmaps;\r
fonts = appData.useFont;\r
+ grid = appData.overrideLineGap >= 0;\r
\r
SetBoardOptionEnables(hDlg);\r
return TRUE;\r
(white != appData.allWhite) ||\r
(fonts != appData.useFont) ||\r
(bitmaps != appData.useBitmaps) ||\r
+ (grid != appData.overrideLineGap >= 0) ||\r
(phc != premoveHighlightColor)) {\r
\r
lightSquareColor = lsc;\r
appData.upsideDown = flip;\r
appData.useFont = fonts;\r
appData.useBitmaps = bitmaps;\r
+ if(grid != appData.overrideLineGap >= 0) appData.overrideLineGap = grid - 1;\r
\r
InitDrawingColors();\r
InitDrawingSizes(boardSize, 0);\r
case OPT_PieceFont:\r
fonts = !fonts;\r
break;\r
+\r
+ case OPT_Grid:\r
+ grid = !grid;\r
+ break;\r
}\r
break;\r
}\r