Rev 116 | Rev 124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 116 | Rev 119 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | 60 | ||
61 | //////////////////////////////////////////////////////////////////////////////////////////////// |
61 | //////////////////////////////////////////////////////////////////////////////////////////////// |
62 | // else have we clicked on the close button ? |
62 | // else have we clicked on the close button ? |
63 | else if (message == WM_CLOSE) |
63 | else if (message == WM_CLOSE) |
64 | { |
64 | { |
65 | if (the_board. |
65 | if ((the_board.game_state == STATE_PLAYING) && ((the_board.move_count > 1) || (Player_FindByType (PLAYER_INTERNET) != NULL))) |
66 | DialogBox_Quit (); // if a game has |
66 | DialogBox_Quit (); // if a game has started OR if we are online against somebody, ask for confirmation |
67 | else |
67 | else |
68 | is_dialogbox_quit_validated = true; // if game hasn't started yet, quit without question |
68 | is_dialogbox_quit_validated = true; // if game hasn't started yet, quit without question |
69 | 69 | ||
70 | return (0); // don't let Windows do the default processing on this message |
70 | return (0); // don't let Windows do the default processing on this message |
71 | } |
71 | } |
Line 121... | Line 121... | ||
121 | else if (wParam_loword == MENUID_GAME_SAVE) |
121 | else if (wParam_loword == MENUID_GAME_SAVE) |
122 | { |
122 | { |
123 | if (save_pathname[0] != 0) |
123 | if (save_pathname[0] != 0) |
124 | is_dialogbox_save_validated = true; // if the filename is known, save it directly |
124 | is_dialogbox_save_validated = true; // if the filename is known, save it directly |
125 | else |
125 | else |
126 | DialogBox_Save (); // else fire up the save dialog box |
126 | DialogBox_Save (false); // else fire up the save dialog box |
127 | } |
127 | } |
128 | 128 | ||
129 | // game menu, save as |
129 | // game menu, save as |
130 | else if (wParam_loword == MENUID_GAME_SAVEAS) |
130 | else if (wParam_loword == MENUID_GAME_SAVEAS) |
131 | DialogBox_Save (); // fire up the save dialog box |
131 | DialogBox_Save (false); // fire up the save dialog box |
132 | 132 | ||
133 | // game menu, save position as |
133 | // game menu, save position as |
134 | else if (wParam_loword == MENUID_GAME_SAVEPOSITIONAS) |
134 | else if (wParam_loword == MENUID_GAME_SAVEPOSITIONAS) |
135 | DialogBox_SavePosition (); // fire up the save position dialog box |
135 | DialogBox_SavePosition (); // fire up the save position dialog box |
136 | 136 | ||
Line 159... | Line 159... | ||
159 | DialogBox_Options (); // fire up the options dialog box |
159 | DialogBox_Options (); // fire up the options dialog box |
160 | 160 | ||
161 | // game menu, quit |
161 | // game menu, quit |
162 | else if (wParam_loword == MENUID_GAME_QUIT) |
162 | else if (wParam_loword == MENUID_GAME_QUIT) |
163 | { |
163 | { |
164 | if (the_board. |
164 | if ((the_board.game_state == STATE_PLAYING) && ((the_board.move_count > 1) || (Player_FindByType (PLAYER_INTERNET) != NULL))) |
165 | DialogBox_Quit (); // if a game has |
165 | DialogBox_Quit (); // if a game has started OR if we are online against somebody, ask for confirmation |
166 | else |
166 | else |
167 | is_dialogbox_quit_validated = true; // if game hasn't started yet, quit without question |
167 | is_dialogbox_quit_validated = true; // if game hasn't started yet, quit without question |
168 | } |
168 | } |
169 | 169 | ||
170 | // chessboard menu, suggest move |
170 | // chessboard menu, suggest move |