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
 
@@ -123,12 +123,13 @@ static const WindowDesc _air_toolbar_des
 
	_air_toolbar_widgets,
 
	BuildAirToolbWndProc
 
};
 

	
 
void ShowBuildAirToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	DeleteWindowById(WC_BUILD_TOOLBAR, 0);
 
	AllocateWindowDescFront(&_air_toolbar_desc, 0);
 
}
 

	
 
static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
 
{
dock_gui.c
Show inline comments
 
@@ -201,12 +201,13 @@ static const WindowDesc _build_docks_too
 
	_build_docks_toolb_widgets,
 
	BuildDocksToolbWndProc
 
};
 

	
 
void ShowBuildDocksToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	DeleteWindowById(WC_BUILD_TOOLBAR, 0);
 
	AllocateWindowDesc(&_build_docks_toolbar_desc);
 
}
 

	
 
static void BuildDockStationWndProc(Window *w, WindowEvent *e)
 
{
rail_gui.c
Show inline comments
 
@@ -800,12 +800,14 @@ static const WindowDesc * const _build_r
 
};
 

	
 
void ShowBuildRailToolbar(int index, int button)
 
{
 
	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);
 
		_cur_railtype = (byte)index;
 
		w = AllocateWindowDesc(_build_rr_desc[index]);
 
	}
road_gui.c
Show inline comments
 
@@ -301,12 +301,13 @@ static const WindowDesc _build_road_desc
 
	_build_road_widgets,
 
	BuildRoadToolbWndProc
 
};
 

	
 
void ShowBuildRoadToolbar()
 
{
 
	if (_current_player == OWNER_SPECTATOR) return;
 
	DeleteWindowById(WC_BUILD_TOOLBAR, 0);
 
	AllocateWindowDesc(&_build_road_desc);
 
}
 

	
 
static const Widget _build_road_scen_widgets[] = {
 
{    WWT_TEXTBTN,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,	STR_018B_CLOSE_WINDOW},
terraform_gui.c
Show inline comments
 
@@ -208,8 +208,9 @@ static const WindowDesc _terraform_desc 
 
};
 

	
 

	
 

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