Subversion Repositories Games.Chess Giants

Rev

Rev 178 | Rev 192 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 178 Rev 189
Line 72... Line 72...
72
   unsigned short wParam_loword;
72
   unsigned short wParam_loword;
73
   wchar_t *port_string;
73
   wchar_t *port_string;
74
   int language_index;
74
   int language_index;
75
   int engine_index;
75
   int engine_index;
76
   int is_checked;
76
   int is_checked;
-
 
77
   int level;
77
 
78
 
78
   // filter out the commonly used message values
79
   // filter out the commonly used message values
79
   wParam_hiword = HIWORD (wParam);
80
   wParam_hiword = HIWORD (wParam);
80
   wParam_loword = LOWORD (wParam);
81
   wParam_loword = LOWORD (wParam);
81
 
82
 
Line 332... Line 333...
332
         EndDialog (hWnd, 0); // close the dialog box
333
         EndDialog (hWnd, 0); // close the dialog box
333
 
334
 
334
      // else was it the expert settings button ?
335
      // else was it the expert settings button ?
335
      else if (wParam_loword == BUTTON_EXPERTSETTINGS)
336
      else if (wParam_loword == BUTTON_EXPERTSETTINGS)
336
      {
337
      {
337
         ComboBox_GetLBText (TabControl_GetItem (tab_control, COMBOBOX_ENGINE), ComboBox_GetCurSel (TabControl_GetItem (tab_control, COMBOBOX_ENGINE)), value_string);
-
 
338
         swprintf_s (temp_string, WCHAR_SIZEOF (temp_string), L"%s\\engines\\%s\\init.txt", app_path, value_string);
338
         swprintf_s (temp_string, WCHAR_SIZEOF (temp_string), L"%s\\engines\\%s\\init.txt", app_path, options.engine.programs[ComboBox_GetCurSel (TabControl_GetItem (tab_control, COMBOBOX_ENGINE))].folder);
339
         ShellExecute (NULL, L"open", temp_string, NULL, NULL, SW_SHOWNORMAL); // open the engine initialization text file
339
         ShellExecute (NULL, L"open", temp_string, NULL, NULL, SW_SHOWNORMAL); // open the engine initialization text file
340
      }
340
      }
341
 
341
 
342
      // else is it the rotate board check box ? if so, enable or disable the speed slider
342
      // else is it the rotate board check box ? if so, enable or disable the speed slider
343
      else if (wParam_loword == CHECKBOX_OPTIONS_ROTATEBOARD)
343
      else if (wParam_loword == CHECKBOX_OPTIONS_ROTATEBOARD)
Line 442... Line 442...
442
   else if (message == WM_HSCROLL)
442
   else if (message == WM_HSCROLL)
443
   {
443
   {
444
      // is it the engine prediction level slider ? if so, update the slider value text
444
      // is it the engine prediction level slider ? if so, update the slider value text
445
      if ((HWND) lParam == TabControl_GetItem (tab_control, SLIDER_ENGINE_DIFFICULTYLEVEL))
445
      if ((HWND) lParam == TabControl_GetItem (tab_control, SLIDER_ENGINE_DIFFICULTYLEVEL))
446
      {
446
      {
447
         swprintf_s (value_string, WCHAR_SIZEOF (value_string), L"%d", SendMessage (TabControl_GetItem (tab_control, SLIDER_ENGINE_DIFFICULTYLEVEL), TBM_GETPOS, 0, 0));
447
         level = SendMessage (TabControl_GetItem (tab_control, SLIDER_ENGINE_DIFFICULTYLEVEL), TBM_GETPOS, 0, 0); // retrieve the difficulty level
-
 
448
         swprintf_s (value_string, WCHAR_SIZEOF (value_string), L"%d", level);
448
         SetWindowText (TabControl_GetItem (tab_control, STATICTEXT_ENGINESEARCHDEPTHVALUE), value_string);
449
         SetWindowText (TabControl_GetItem (tab_control, STATICTEXT_ENGINESEARCHDEPTHVALUE), value_string);
-
 
450
         if ((level > 20) && (wParam_loword == SB_THUMBPOSITION))
-
 
451
            MessageBox (hWnd, LOCALIZE (L"Options_ExcessiveDifficulty"), LOCALIZE (L"ImportantMessage"), MB_ICONWARNING | MB_OK); // if the user is a dumb fuck, let him know that he is (FIXME: this displays twice)
449
      }
452
      }
450
 
453
 
451
      // else is it the engine blunders slider ? if so, update the slider value text
454
      // else is it the engine blunders slider ? if so, update the slider value text
452
      else if ((HWND) lParam == TabControl_GetItem (tab_control, SLIDER_ENGINE_BLUNDERCHANCE))
455
      else if ((HWND) lParam == TabControl_GetItem (tab_control, SLIDER_ENGINE_BLUNDERCHANCE))
453
      {
456
      {