From 26b375d2fab95af130d9e5671ca530b096d7ed33 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 10 Jun 2009 21:37:47 -0700 Subject: [PATCH] add the already supported variants 3check and great (=Great Shatranj) to the New Variant... menu. --- winboard/resource.h | 2 ++ winboard/winboard.rc | 24 ++++++++++++++---------- winboard/woptions.c | 12 ++++++++---- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/winboard/resource.h b/winboard/resource.h index 812247a..4da6928 100644 --- a/winboard/resource.h +++ b/winboard/resource.h @@ -476,6 +476,8 @@ #define OPT_VariantWildcastle 1523 #define OPT_VariantNocastle 1524 #define OPT_VariantGiveaway 1525 +#define OPT_Variant3Check 1526 +#define OPT_VariantGreat 1527 #define IDC_Files 1550 #define IDC_Ranks 1551 #define IDC_Holdings 1552 diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 59c0e9e..6d5008b 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -637,6 +637,8 @@ BEGIN 50,10 CONTROL "&Janus",OPT_VariantJanus,"Button",BS_AUTORADIOBUTTON,9,84, 50,10 + CONTROL "&3Check",OPT_Variant3Check,"Button",BS_AUTORADIOBUTTON,9,94, + 50,10 CONTROL "&knightmate",OPT_VariantKnightmate,"Button",BS_AUTORADIOBUTTON, 70,14,50,10 CONTROL "&atomic",OPT_VariantAtomic,"Button",BS_AUTORADIOBUTTON, @@ -653,6 +655,8 @@ BEGIN 50,10 CONTROL "&wildcastle",OPT_VariantWildcastle,"Button",BS_AUTORADIOBUTTON,70,84, 50,10 + CONTROL "&great",OPT_VariantGreat,"Button",BS_AUTORADIOBUTTON,70,94, + 50,10 CONTROL "&fairy",OPT_VariantFairy,"Button",BS_AUTORADIOBUTTON,134, 14,50,10 CONTROL "&bughouse",OPT_VariantBughouse,"Button",BS_AUTORADIOBUTTON,134,24,50, @@ -669,16 +673,16 @@ BEGIN 74,50,10 CONTROL "&nocastle",OPT_VariantNocastle,"Button",BS_AUTORADIOBUTTON,134, 84,50,10 - GROUPBOX "Variant",IDC_STATIC,4,4,185,95 - LTEXT "Board size:",IDC_STATIC,10,115,40,8 - EDITTEXT IDC_Ranks,60,111,14,14,ES_AUTOHSCROLL - LTEXT "ranks",IDC_STATIC,77,115,22,8 - EDITTEXT IDC_Files,116,111,14,14,ES_AUTOHSCROLL - LTEXT "files",IDC_STATIC,133,115,37,8 - LTEXT "Holdings with room for:",IDC_STATIC,10,133,90,8 - EDITTEXT IDC_Holdings,93,129,14,14,ES_AUTOHSCROLL - LTEXT "pieces",IDC_STATIC,110,133,22,8 - LTEXT "('-1' means defaults for selected variant)",IDC_STATIC,10,151,150,8 + GROUPBOX "Variant",IDC_STATIC,4,4,185,105 + LTEXT "Board size:",IDC_STATIC,10,125,40,8 + EDITTEXT IDC_Ranks,60,121,14,14,ES_AUTOHSCROLL + LTEXT "ranks",IDC_STATIC,77,125,22,8 + EDITTEXT IDC_Files,116,121,14,14,ES_AUTOHSCROLL + LTEXT "files",IDC_STATIC,133,125,37,8 + LTEXT "Holdings with room for:",IDC_STATIC,10,143,90,8 + EDITTEXT IDC_Holdings,93,139,14,14,ES_AUTOHSCROLL + LTEXT "pieces",IDC_STATIC,110,143,22,8 + LTEXT "('-1' means defaults for selected variant)",IDC_STATIC,10,161,150,8 END DLG_Fonts DIALOG DISCARDABLE 0, 0, 266, 226 diff --git a/winboard/woptions.c b/winboard/woptions.c index b1f50b6..cd0b029 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -793,7 +793,9 @@ VariantWhichRadio(HWND hDlg) (IsDlgButtonChecked(hDlg, OPT_VariantJanus) ? VariantJanus : (IsDlgButtonChecked(hDlg, OPT_VariantWildcastle) ? VariantWildCastle : (IsDlgButtonChecked(hDlg, OPT_VariantNocastle) ? VariantNoCastle : - VariantNormal )))))))))))))))))))))))); + (IsDlgButtonChecked(hDlg, OPT_Variant3Check) ? Variant3Check : + (IsDlgButtonChecked(hDlg, OPT_VariantGreat) ? VariantGreat : + VariantNormal )))))))))))))))))))))))))); } LRESULT CALLBACK @@ -866,6 +868,8 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CheckDlgButton(hDlg, OPT_VariantCylinder, TRUE); break; case Variant3Check: + CheckDlgButton(hDlg, OPT_Variant3Check, TRUE); + break; case VariantSuper: CheckDlgButton(hDlg, OPT_VariantSuper, TRUE); break; @@ -881,9 +885,9 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case VariantNoCastle: CheckDlgButton(hDlg, OPT_VariantNocastle, TRUE); break; -// case VariantGreat: // Note to self: must still make this button (and GiveAway too). -// CheckDlgButton(hDlg, OPT_VariantGreat, TRUE); -// break; + case VariantGreat: // Note to self: must still make this button (and GiveAway too). + CheckDlgButton(hDlg, OPT_VariantGreat, TRUE); + break; default: ; } -- 1.7.0.4