Mercurial > hg > openttd
changeset 946:45abacd24857 draft
(svn r1435) Fix: [ 1094092 ] Toolbars accessible via keyboard in spectator mode
author | dominik <dominik@openttd.org> |
---|---|
date | Sat, 08 Jan 2005 20:55:21 +0000 |
parents | a49d6b9ebe7c |
children | d75fac0ea123 |
files | airport_gui.c dock_gui.c rail_gui.c road_gui.c terraform_gui.c |
diffstat | 5 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/airport_gui.c +++ b/airport_gui.c @@ -126,6 +126,7 @@ void ShowBuildAirToolbar() { + if (_current_player == OWNER_SPECTATOR) return; DeleteWindowById(WC_BUILD_TOOLBAR, 0); AllocateWindowDescFront(&_air_toolbar_desc, 0); }
--- a/dock_gui.c +++ b/dock_gui.c @@ -204,6 +204,7 @@ void ShowBuildDocksToolbar() { + if (_current_player == OWNER_SPECTATOR) return; DeleteWindowById(WC_BUILD_TOOLBAR, 0); AllocateWindowDesc(&_build_docks_toolbar_desc); }
--- a/rail_gui.c +++ b/rail_gui.c @@ -803,6 +803,8 @@ { Window *w; + if (_current_player == OWNER_SPECTATOR) return; + // don't recreate the window if we're clicking on a button and the window exists. if (button < 0 || !(w = FindWindowById(WC_BUILD_TOOLBAR, 0)) || w->wndproc != BuildRailToolbWndProc) { DeleteWindowById(WC_BUILD_TOOLBAR, 0);