TYPE_SWITCH,
&setup.ask_on_game_over, "ask_on_game_over"
},
+ {
+ TYPE_SWITCH,
+ &setup.ask_on_quit_game, "ask_on_quit_game"
+ },
+ {
+ TYPE_SWITCH,
+ &setup.ask_on_quit_program, "ask_on_quit_program"
+ },
{
TYPE_SWITCH,
&setup.quick_switch, "quick_player_switch"
si->ask_on_escape = TRUE;
si->ask_on_escape_editor = TRUE;
si->ask_on_game_over = TRUE;
+ si->ask_on_quit_game = TRUE;
+ si->ask_on_quit_program = TRUE;
si->quick_switch = FALSE;
si->input_on_focus = FALSE;
si->prefer_aga_graphics = TRUE;
{
if (skip_request || Request(message, REQ_ASK | REQ_STAY_CLOSED))
{
- // closing door required in case of envelope style request dialogs
- if (!skip_request)
+ if (!quick_quit)
{
// prevent short reactivation of overlay buttons while closing door
SetOverlayActive(FALSE);
+ // door may still be open due to skipped or envelope style request
CloseDoor(DOOR_CLOSE_1);
}
void RequestQuitGame(boolean escape_key_pressed)
{
- boolean quick_quit = ((escape_key_pressed && !setup.ask_on_escape) ||
+ boolean ask_on_escape = (setup.ask_on_escape && setup.ask_on_quit_game);
+ boolean quick_quit = ((escape_key_pressed && !ask_on_escape) ||
level_editor_test_game);
- boolean skip_request = game.all_players_gone || quick_quit;
+ boolean skip_request = (game.all_players_gone || !setup.ask_on_quit_game ||
+ quick_quit);
RequestQuitGameExt(skip_request, quick_quit,
"Do you really want to quit the game?");
boolean ask_on_escape;
boolean ask_on_escape_editor;
boolean ask_on_game_over;
+ boolean ask_on_quit_game;
+ boolean ask_on_quit_program;
boolean quick_switch;
boolean input_on_focus;
boolean prefer_aga_graphics;
SaveLevelSetup_LastSeries();
SaveLevelSetup_SeriesInfo();
- if (Request("Do you really want to quit?", REQ_ASK | REQ_STAY_CLOSED))
+ if (!setup.ask_on_quit_program ||
+ Request("Do you really want to quit?", REQ_ASK | REQ_STAY_CLOSED))
SetGameStatus(GAME_MODE_QUIT);
}
}
{ TYPE_SWITCH, &setup.count_score_after_game,"Count Score After Game:" },
{ TYPE_SWITCH, &setup.show_scores_after_game,"Show Scores After Game:" },
{ TYPE_YES_NO, &setup.ask_on_game_over, "Ask on Game Over:" },
+ { TYPE_YES_NO, &setup.ask_on_quit_game, "Ask on Quit Game:" },
+ { TYPE_YES_NO, &setup.ask_on_quit_program, "Ask on Quit Program:" },
{ TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" },
{ TYPE_ENTER_LIST, execSetupChooseGameSpeed, "Game Speed:" },
{ TYPE_STRING, &game_speed_text, "" },