From: H.G.Muller Date: Mon, 11 Jan 2016 23:01:31 +0000 (+0100) Subject: Increas number of engine-defined variants to 15 (WB) X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=87de8ff524ffdde57cf2cd1a92c44a3a9377e28d;p=xboard.git Increas number of engine-defined variants to 15 (WB) The number of engine-defined variants that can be selected in WinBoard's New Variant dialog is increased from 9 to 15 by adding some radio buttons. --- diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 62ed079..2ea86ee 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -696,7 +696,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,140,244,50,14 END -DLG_NewVariant DIALOG DISCARDABLE 0, 0, 224, 250 +DLG_NewVariant DIALOG DISCARDABLE 0, 0, 224, 270 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Variants" FONT 8, "MS Sans Serif" @@ -774,21 +774,26 @@ BEGIN CONTROL "",OPT_EngineVariant+4,"Button",BS_AUTORADIOBUTTON,80,144,70,10 CONTROL "",OPT_EngineVariant+5,"Button",BS_AUTORADIOBUTTON,154,144,70,10 CONTROL "",OPT_EngineVariant+6,"Button",BS_AUTORADIOBUTTON,9,154,70,10 - CONTROL "",OPT_EngineVariant+7,"Button",BS_AUTORADIOBUTTON,80,154,70,10 CONTROL "",OPT_EngineVariant+8,"Button",BS_AUTORADIOBUTTON,154,154,70,10 - GROUPBOX "Variant",GPB_Variant,4,4,215,165 - LTEXT "Board size:",GPB_Board,10,183,40,8,WS_TABSTOP - LTEXT "ranks",IDC_Height,77,183,38,8 - EDITTEXT IDC_Ranks,60,179,14,14,ES_AUTOHSCROLL - LTEXT "files",IDC_Width,133,183,80,8 - EDITTEXT IDC_Files,116,179,14,14,ES_AUTOHSCROLL - LTEXT "Holdings with room for:",IDC_Hand,10,201,90,8 - EDITTEXT IDC_Holdings,93,197,14,14,ES_AUTOHSCROLL - LTEXT "pieces",IDC_Pieces,110,201,100,8 - LTEXT "('-1' means defaults for selected variant)",IDC_Def,10,217,210,8 - DEFPUSHBUTTON "OK",IDOK,114,232,50,14 - PUSHBUTTON "Cancel",IDCANCEL,170,232,50,14 + CONTROL "",OPT_EngineVariant+9,"Button",BS_AUTORADIOBUTTON,9,164,70,10 + CONTROL "",OPT_EngineVariant+10,"Button",BS_AUTORADIOBUTTON,80,164,70,10 + CONTROL "",OPT_EngineVariant+11,"Button",BS_AUTORADIOBUTTON,154,164,70,10 + CONTROL "",OPT_EngineVariant+12,"Button",BS_AUTORADIOBUTTON,9,174,70,10 + CONTROL "",OPT_EngineVariant+13,"Button",BS_AUTORADIOBUTTON,80,174,70,10 + CONTROL "",OPT_EngineVariant+14,"Button",BS_AUTORADIOBUTTON,154,174,70,10 + GROUPBOX "Variant",GPB_Variant,4,4,215,185 + LTEXT "Board size:",GPB_Board,10,203,40,8,WS_TABSTOP + LTEXT "ranks",IDC_Height,77,203,38,8 + EDITTEXT IDC_Ranks,60,199,14,14,ES_AUTOHSCROLL + LTEXT "files",IDC_Width,133,203,80,8 + EDITTEXT IDC_Files,116,199,14,14,ES_AUTOHSCROLL + LTEXT "Holdings with room for:",IDC_Hand,10,221,90,8 + EDITTEXT IDC_Holdings,93,217,14,14,ES_AUTOHSCROLL + LTEXT "pieces",IDC_Pieces,110,221,100,8 + LTEXT "('-1' means defaults for selected variant)",IDC_Def,10,237,210,8 + DEFPUSHBUTTON "OK",IDOK,114,252,50,14 + PUSHBUTTON "Cancel",IDCANCEL,170,252,50,14 END DLG_Fonts DIALOG DISCARDABLE 0, 0, 266, 274 diff --git a/winboard/woptions.c b/winboard/woptions.c index a149b41..89f30f7 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -883,7 +883,7 @@ VariantWhichRadio(HWND hDlg) if(IsDlgButtonChecked(hDlg, j) && (appData.noChessProgram || strstr(first.variants, VariantName(i-1)))) return (VariantClass) i-1; } - for(i=0; i<9; i++) { // check for engine-defined variants + for(i=0; i<15; i++) { // check for engine-defined variants if(IsDlgButtonChecked(hDlg, OPT_EngineVariant+i) ) { GetDlgItemText(hDlg, OPT_EngineVariant+i, engineVariant, MSG_SIZ); // remember name, so we can resolve it later return VariantUnknown; @@ -904,7 +904,7 @@ VariantShowRadio(HWND hDlg) EnableWindow(GetDlgItem(hDlg, j), appData.noChessProgram || strstr(first.variants, VariantName(i-1))); } *engineVariant = c; - for(i=0; i<9; i++) { // initialize engine-defined variants + for(i=0; i<15; i++) { // initialize engine-defined variants char *v = EngineDefinedVariant(&first, i); // get name of #i if(v) { // there is such a variant EnableWindow(GetDlgItem(hDlg, OPT_EngineVariant+i), TRUE); // and enable the button