(svn r6380) -Codechange: unify all ways to quit OTTD.

This means that in the intro menu the 'Quit' button immediatelly quits
  and the 'Quit' in the menu of the normal game and scenario editor
  immediatelly quits when the 'autosave_on_exit' patch is turned on.
  This is the same way as the OS/window manager initiated quits, like
  alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
This commit is contained in:
rubidium
2006-09-04 17:30:30 +00:00
parent 56d06ba0a7
commit a7cfb80c40
8 changed files with 23 additions and 49 deletions

View File

@@ -170,14 +170,14 @@ static void MenuClickSaveLoad(int index)
case 0: ShowSaveLoadDialog(SLD_SAVE_SCENARIO); break;
case 1: ShowSaveLoadDialog(SLD_LOAD_SCENARIO); break;
case 2: AskExitToGameMenu(); break;
case 4: AskExitGame(); break;
case 4: HandleExitGameRequest(); break;
}
} else {
switch (index) {
case 0: ShowSaveLoadDialog(SLD_SAVE_GAME); break;
case 1: ShowSaveLoadDialog(SLD_LOAD_GAME); break;
case 2: AskExitToGameMenu(); break;
case 3: AskExitGame(); break;
case 3: HandleExitGameRequest(); break;
}
}
}
@@ -2226,7 +2226,7 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
switch (e->keypress.keycode) {
case 'Q' | WKC_CTRL:
case 'Q' | WKC_META:
AskExitGame();
HandleExitGameRequest();
break;
}