summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-04-03 13:35:43 +0000
committerDarkvater <Darkvater@openttd.org>2005-04-03 13:35:43 +0000
commit9aacf737201b9b34efa6f9693a4b6d8ea825e260 (patch)
tree43d0c30344fa5ad98c004c575d478e6a31e1338b /main_gui.c
parentf203150f7d3e770e7f78d14e95c9aff37f89cdc9 (diff)
downloadopenttd-9aacf737201b9b34efa6f9693a4b6d8ea825e260.tar.xz
(svn r2141) - Fix: Keys now hopefully only activate the right windows. If console/querybox/chatbox is open, all input goes there, if closed to game itself.
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main_gui.c b/main_gui.c
index 4b2580f54..3dfff92f9 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -1911,8 +1911,8 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
case 'A': ShowBuildRailToolbar(_last_built_railtype, 4); break; /* Invoke Autorail */
case 'L': ShowTerraformToolbar(); break;
default: return;
- e->keypress.cont = false;
}
+ e->keypress.cont = false;
} break;
case WE_PLACE_OBJ: {
@@ -2397,14 +2397,14 @@ void SetupColorsAndInitialWindow(void)
// XXX: these are not done
switch(_game_mode) {
case GM_MENU:
- w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL);
+ w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
AssignWindowViewport(w, 0, 0, width, height, TILE_XY(32, 32), 0);
// w = AllocateWindowDesc(&_toolb_intro_desc);
// w->flags4 &= ~WF_WHITE_BORDER_MASK;
ShowSelectGameWindow();
break;
case GM_NORMAL:
- w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL);
+ w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
AssignWindowViewport(w, 0, 0, width, height, TILE_XY(32, 32), 0);
ShowVitalWindows();
@@ -2415,7 +2415,7 @@ void SetupColorsAndInitialWindow(void)
break;
case GM_EDITOR:
- w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL);
+ w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
AssignWindowViewport(w, 0, 0, width, height, 0, 0);
w = AllocateWindowDesc(&_toolb_scen_desc);