Changeset - r946:70fe894a35f5
[Not reviewed]
master
0 5 0
dominik - 19 years ago 2005-01-08 20:55:21
dominik@openttd.org
(svn r1435) Fix: [ 1094092 ] Toolbars accessible via keyboard in spectator mode
5 files changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
airport_gui.c
Show inline comments
 
@@ -126,6 +126,7 @@ static const WindowDesc _air_toolbar_des
 

	
 
void ShowBuildAirToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	DeleteWindowById(WC_BUILD_TOOLBAR, 0);
 
	AllocateWindowDescFront(&_air_toolbar_desc, 0);
 
}
dock_gui.c
Show inline comments
 
@@ -204,6 +204,7 @@ static const WindowDesc _build_docks_too
 

	
 
void ShowBuildDocksToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	DeleteWindowById(WC_BUILD_TOOLBAR, 0);
 
	AllocateWindowDesc(&_build_docks_toolbar_desc);
 
}
rail_gui.c
Show inline comments
 
@@ -803,6 +803,8 @@ void ShowBuildRailToolbar(int index, int
 
{
 
	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);
road_gui.c
Show inline comments
 
@@ -304,6 +304,7 @@ static const WindowDesc _build_road_desc
 

	
 
void ShowBuildRoadToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	DeleteWindowById(WC_BUILD_TOOLBAR, 0);
 
	AllocateWindowDesc(&_build_road_desc);
 
}
terraform_gui.c
Show inline comments
 
@@ -211,5 +211,6 @@ static const WindowDesc _terraform_desc 
 

	
 
void ShowTerraformToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	AllocateWindowDescFront(&_terraform_desc, 0);
 
}
0 comments (0 inline, 0 general)