changes from H.G. Muller; version 4.3.7
[xboard.git] / winboard / woptions.c
index 1d92129..4f91822 100644 (file)
@@ -495,7 +495,7 @@ BoardOptionsWhichRadio(HWND hDlg)
 LRESULT CALLBACK\r
 BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
 {\r
-  static Boolean  mono;\r
+  static Boolean  mono, white, flip;\r
   static BoardSize size;\r
   static COLORREF lsc, dsc, wpc, bpc, hsc, phc;\r
   static HBITMAP pieces[3];\r
@@ -564,6 +564,12 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     if (appData.monoMode)\r
       CheckDlgButton(hDlg, OPT_Monochrome, TRUE);\r
 \r
+    if (appData.allWhite)\r
+      CheckDlgButton(hDlg, OPT_AllWhite, TRUE);\r
+\r
+    if (appData.upsideDown)\r
+      CheckDlgButton(hDlg, OPT_UpsideDown, 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
@@ -575,6 +581,8 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     hsc = highlightSquareColor;\r
     phc = premoveHighlightColor;\r
     mono = appData.monoMode;\r
+    white= appData.allWhite;\r
+    flip = appData.upsideDown;\r
     size = boardSize;\r
 \r
     SetBoardOptionEnables(hDlg);\r
@@ -619,6 +627,8 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
          (wpc  != whitePieceColor) ||\r
          (bpc  != blackPieceColor) ||\r
          (hsc  != highlightSquareColor) ||\r
+          (flip != appData.upsideDown) ||\r
+          (white != appData.allWhite) ||\r
          (phc  != premoveHighlightColor)) {\r
 \r
          lightSquareColor = lsc;\r
@@ -628,6 +638,8 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
          highlightSquareColor = hsc;\r
          premoveHighlightColor = phc;\r
          appData.monoMode = mono;\r
+          appData.allWhite = white;\r
+          appData.upsideDown = flip;\r
 \r
          InitDrawingColors();\r
          InitDrawingSizes(boardSize, 0);\r
@@ -713,6 +725,16 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
       mono = !mono;\r
       SetBoardOptionEnables(hDlg);\r
       break;\r
+\r
+    case OPT_AllWhite:\r
+      white = !white;\r
+      SetBoardOptionEnables(hDlg);\r
+      break;\r
+\r
+    case OPT_UpsideDown:\r
+      flip = !flip;\r
+      SetBoardOptionEnables(hDlg);\r
+      break;\r
     }\r
     break;\r
   }\r