SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);\r
+ SetSampleFontText(hDlg, OPT_SampleGameListFont, &workFont[GAMELIST_FONT]);\r
firstPaint = FALSE;\r
}\r
break;\r
CopyFont(font[i][CONSOLE_FONT], &workFont[CONSOLE_FONT]);\r
CopyFont(font[i][COMMENT_FONT], &workFont[COMMENT_FONT]);\r
CopyFont(font[i][MOVEHISTORY_FONT], &workFont[MOVEHISTORY_FONT]);\r
+ CopyFont(font[i][GAMELIST_FONT], &workFont[GAMELIST_FONT]);\r
}\r
/* end sad necessity */\r
\r
SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);\r
break;\r
\r
+ case OPT_ChooseGameListFont:\r
+ MyCreateFont(hDlg, &workFont[GAMELIST_FONT]);\r
+ SetSampleFontText(hDlg, OPT_SampleGameListFont, &workFont[GAMELIST_FONT]);\r
+ break;\r
+\r
case OPT_DefaultFonts:\r
for (i=0; i<NUM_FONTS; i++) {\r
DeleteObject(&workFont[i].hf);\r
SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);\r
+ SetSampleFontText(hDlg, OPT_SampleGameListFont, &workFont[GAMELIST_FONT]);\r
break;\r
}\r
}\r
*\r
\*---------------------------------------------------------------------------*/\r
\r
+int\r
+LoadOptionsWhichRadio(HWND hDlg)\r
+{\r
+ return (IsDlgButtonChecked(hDlg, OPT_Exact) ? 1 :\r
+ (IsDlgButtonChecked(hDlg, OPT_Subset) ? 2 :\r
+ (IsDlgButtonChecked(hDlg, OPT_Struct) ? 3 :\r
+ (IsDlgButtonChecked(hDlg, OPT_Material) ? 4 : -1))));\r
+}\r
+\r
VOID\r
SetLoadOptionEnables(HWND hDlg)\r
{\r
{\r
char buf[MSG_SIZ];\r
float fnumber;\r
+ int ok;\r
\r
switch (message) {\r
case WM_INITDIALOG: /* message: initialize dialog box */\r
CheckDlgButton(hDlg, OPT_Autostep, FALSE);\r
}\r
SetLoadOptionEnables(hDlg);\r
+ SetDlgItemInt(hDlg, OPT_elo1, appData.eloThreshold1, FALSE);\r
+ SetDlgItemInt(hDlg, OPT_elo2, appData.eloThreshold2, FALSE);\r
+ SetDlgItemInt(hDlg, OPT_date, appData.dateThreshold, FALSE);\r
+ switch (appData.searchMode) {\r
+ case 1:\r
+ CheckDlgButton(hDlg, OPT_Exact, TRUE);\r
+ break;\r
+ case 2:\r
+ CheckDlgButton(hDlg, OPT_Subset, TRUE);\r
+ break;\r
+ case 3:\r
+ CheckDlgButton(hDlg, OPT_Struct, TRUE);\r
+ break;\r
+ case 4:\r
+ CheckDlgButton(hDlg, OPT_Material, TRUE);\r
+ break;\r
+ }\r
return TRUE;\r
\r
case WM_COMMAND: /* message: received a command */\r
} else {\r
appData.timeDelay = (float) -1.0;\r
}\r
+ appData.eloThreshold1 = GetDlgItemInt(hDlg, OPT_elo1, &ok, FALSE);\r
+ appData.eloThreshold2 = GetDlgItemInt(hDlg, OPT_elo2, &ok, FALSE);\r
+ appData.dateThreshold = GetDlgItemInt(hDlg, OPT_date, &ok, FALSE);\r
+ appData.searchMode = LoadOptionsWhichRadio(hDlg);\r
EndDialog(hDlg, TRUE);\r
return TRUE;\r
\r