summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-03-12 21:21:47 +0000
committerDarkvater <Darkvater@openttd.org>2005-03-12 21:21:47 +0000
commitef1325cd3688fd64b9e0efd18db22aa5445ef9a6 (patch)
tree3e154dae321b4ae4880a4ae3ad91616338e7b720 /main_gui.c
parent9ef5a76b3ef6af43127b6a6d96f108accd490f41 (diff)
downloadopenttd-ef1325cd3688fd64b9e0efd18db22aa5445ef9a6.tar.xz
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
- Fix: [ 1153926 ] All my settings in vain... IGNORED! - Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/main_gui.c b/main_gui.c
index d397074f5..3c411122e 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -1298,7 +1298,7 @@ static void ScenEditLandGenWndProc(Window *w, WindowEvent *e)
}
break;
case WE_CLICK:
- switch(e->click.widget) {
+ switch (e->click.widget) {
case 3: /* raise corner */
HandlePlacePushButton(w, 3, ANIMCURSOR_RAISELAND, 2, PlaceProc_RaiseBigLand);
break;
@@ -1355,7 +1355,7 @@ terraform_size_common:;
}
break;
case WE_TIMEOUT:
- UnclickSomeWindowButtons(w, ~(1<<3 | 1<<4 | 1<<5 | 1<<10|1<<11|1<<12));
+ UnclickSomeWindowButtons(w, ~(1<<3 | 1<<4 | 1<<5 | 1<<10 | 1<<11 | 1<<12));
break;
case WE_PLACE_OBJ:
_place_proc(e->place.tile);
@@ -1826,8 +1826,7 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
if (local == 0xff) local = 0; // spectator
switch(e->keypress.keycode) {
- case WKC_F1:
- case WKC_PAUSE:
+ case WKC_F1: case WKC_PAUSE:
ToolbarPauseClick(w);
break;
case WKC_F2: ShowGameOptions(); break;
@@ -1856,6 +1855,8 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
case WKC_CTRL | 'S': _make_screenshot = 1; break;
case WKC_CTRL | 'G': _make_screenshot = 2; break;
case WKC_CTRL | WKC_ALT | 'C': if (!_networking) ShowCheatWindow(); break;
+ default: return;
+ e->keypress.cont = false;
}
} break;
@@ -2260,14 +2261,18 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
break;
case WE_KEYPRESS:
+ if (e->keypress.keycode == WKC_BACKQUOTE) {
+ IConsoleSwitch();
+ e->keypress.cont = false;
+ break;
+ }
+
if (_game_mode == GM_MENU)
break;
- switch(e->keypress.keycode) {
- case 'C':
- case 'Z': {
- Point pt;
- pt = GetTileBelowCursor();
+ switch (e->keypress.keycode) {
+ case 'C': case 'Z': {
+ Point pt = GetTileBelowCursor();
if (pt.x != -1) {
ScrollMainWindowTo(pt.x, pt.y);
if (e->keypress.keycode == 'Z')
@@ -2306,11 +2311,6 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
MarkWholeScreenDirty();
break;
- case WKC_BACKQUOTE:
- IConsoleSwitch();
- e->keypress.cont=false;
- break;
-
#ifdef ENABLE_NETWORK
case WKC_RETURN:
case 'T' | WKC_SHIFT: