From bbbecceae1cfd7aed447a30c3e130efbb6997ead Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 25 Jun 2013 20:22:08 +0000 Subject: (svn r25464) -Fix: Hide default size button in non-newstation rail-station picker since it is not resizeable anyway. --- src/rail_gui.cpp | 6 +++++- src/script/api/game/game_window.hpp.sq | 1 + src/script/api/script_window.hpp | 1 + src/widgets/rail_widget.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 446268d73..758367b6d 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -925,6 +925,8 @@ public: newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_MATRIX); newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); + newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_DEFSIZE); + newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_RESIZE); newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); this->FinishInitNested(TRANSPORT_RAIL); @@ -1344,7 +1346,9 @@ static const NWidgetPart _nested_station_builder_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN), + NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BRAS_SHOW_NEWST_DEFSIZE), + NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN), + EndContainer(), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN), NWidget(NWID_HORIZONTAL), diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq index 750f70256..057236948 100644 --- a/src/script/api/game/game_window.hpp.sq +++ b/src/script/api/game/game_window.hpp.sq @@ -920,6 +920,7 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_MATRIX, "WID_BRAS_MATRIX"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_IMAGE, "WID_BRAS_IMAGE"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_MATRIX_SCROLL, "WID_BRAS_MATRIX_SCROLL"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_DEFSIZE, "WID_BRAS_SHOW_NEWST_DEFSIZE"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_ADDITIONS, "WID_BRAS_SHOW_NEWST_ADDITIONS"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_MATRIX, "WID_BRAS_SHOW_NEWST_MATRIX"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_RESIZE, "WID_BRAS_SHOW_NEWST_RESIZE"); diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp index 0d78ab5a3..bbc82047c 100644 --- a/src/script/api/script_window.hpp +++ b/src/script/api/script_window.hpp @@ -1998,6 +1998,7 @@ public: WID_BRAS_IMAGE = ::WID_BRAS_IMAGE, ///< Panel used at each cell of the matrix. WID_BRAS_MATRIX_SCROLL = ::WID_BRAS_MATRIX_SCROLL, ///< Scrollbar of the matrix widget. + WID_BRAS_SHOW_NEWST_DEFSIZE = ::WID_BRAS_SHOW_NEWST_DEFSIZE, ///< Selection for default-size button for newstation. WID_BRAS_SHOW_NEWST_ADDITIONS = ::WID_BRAS_SHOW_NEWST_ADDITIONS, ///< Selection for newstation class selection list. WID_BRAS_SHOW_NEWST_MATRIX = ::WID_BRAS_SHOW_NEWST_MATRIX, ///< Selection for newstation image matrix. WID_BRAS_SHOW_NEWST_RESIZE = ::WID_BRAS_SHOW_NEWST_RESIZE, ///< Selection for panel and resize at bottom right for newstation. diff --git a/src/widgets/rail_widget.h b/src/widgets/rail_widget.h index e468a3e37..f977f4480 100644 --- a/src/widgets/rail_widget.h +++ b/src/widgets/rail_widget.h @@ -64,6 +64,7 @@ enum BuildRailStationWidgets { WID_BRAS_IMAGE, ///< Panel used at each cell of the matrix. WID_BRAS_MATRIX_SCROLL, ///< Scrollbar of the matrix widget. + WID_BRAS_SHOW_NEWST_DEFSIZE, ///< Selection for default-size button for newstation. WID_BRAS_SHOW_NEWST_ADDITIONS, ///< Selection for newstation class selection list. WID_BRAS_SHOW_NEWST_MATRIX, ///< Selection for newstation image matrix. WID_BRAS_SHOW_NEWST_RESIZE, ///< Selection for panel and resize at bottom right for newstation. -- cgit v1.2.3-54-g00ecf