Changeset - r19275:0c394e0a1f14
[Not reviewed]
master
0 4 0
frosch - 12 years ago 2012-04-24 20:01:34
frosch@openttd.org
(svn r24178) -Fix [FS#5110]: The object name from property A was not displayed in the object GUI.
4 files changed with 12 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/object_gui.cpp
Show inline comments
 
@@ -62,6 +62,12 @@ public:
 
	virtual void SetStringParameters(int widget) const
 
	{
 
		switch (widget) {
 
			case WID_BO_OBJECT_NAME: {
 
				const ObjectSpec *spec = ObjectClass::Get(_selected_object_class)->GetSpec(_selected_object_index);
 
				SetDParam(0, spec != NULL ? spec->name : STR_EMPTY);
 
				break;
 
			}
 

	
 
			case WID_BO_OBJECT_SIZE: {
 
				const ObjectSpec *spec = ObjectClass::Get(_selected_object_class)->GetSpec(_selected_object_index);
 
				int size = spec == NULL ? 0 : spec->size;
 
@@ -384,6 +390,7 @@ static const NWidgetPart _nested_build_o
 
						NWidget(WWT_PANEL, COLOUR_GREY, WID_BO_OBJECT_SPRITE), SetDataTip(0x0, STR_OBJECT_BUILD_PREVIEW_TOOLTIP), EndContainer(),
 
					EndContainer(),
 
				EndContainer(),
 
				NWidget(WWT_TEXT, COLOUR_DARK_GREEN, WID_BO_OBJECT_NAME), SetDataTip(STR_ORANGE_STRING, STR_NULL), SetPadding(2, 5, 2, 5),
 
				NWidget(WWT_TEXT, COLOUR_DARK_GREEN, WID_BO_OBJECT_SIZE), SetDataTip(STR_OBJECT_BUILD_SIZE, STR_NULL), SetPadding(2, 5, 2, 5),
 
			EndContainer(),
 
			NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetScrollbar(WID_BO_SELECT_SCROLL),
src/script/api/game/game_window.hpp.sq
Show inline comments
 
@@ -815,6 +815,7 @@ void SQGSWindow_Register(Squirrel *engin
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SCROLLBAR,                          "WID_BO_SCROLLBAR");
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_MATRIX,                      "WID_BO_OBJECT_MATRIX");
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_SPRITE,                      "WID_BO_OBJECT_SPRITE");
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_NAME,                        "WID_BO_OBJECT_NAME");
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_SIZE,                        "WID_BO_OBJECT_SIZE");
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_INFO,                               "WID_BO_INFO");
 
	SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_MATRIX,                      "WID_BO_SELECT_MATRIX");
src/script/api/script_window.hpp
Show inline comments
 
@@ -1762,7 +1762,8 @@ public:
 
		WID_BO_SCROLLBAR                     = ::WID_BO_SCROLLBAR,                     ///< The scrollbar associated with the list.
 
		WID_BO_OBJECT_MATRIX                 = ::WID_BO_OBJECT_MATRIX,                 ///< The matrix with preview sprites.
 
		WID_BO_OBJECT_SPRITE                 = ::WID_BO_OBJECT_SPRITE,                 ///< A preview sprite of the object.
 
		WID_BO_OBJECT_SIZE                   = ::WID_BO_OBJECT_SIZE,                   ///< The size of an object.
 
		WID_BO_OBJECT_NAME                   = ::WID_BO_OBJECT_NAME,                   ///< The name of the selected object.
 
		WID_BO_OBJECT_SIZE                   = ::WID_BO_OBJECT_SIZE,                   ///< The size of the selected object.
 
		WID_BO_INFO                          = ::WID_BO_INFO,                          ///< Other information about the object (from the NewGRF).
 
		WID_BO_SELECT_MATRIX                 = ::WID_BO_SELECT_MATRIX,                 ///< Selection preview matrix of objects of a given class.
 
		WID_BO_SELECT_IMAGE                  = ::WID_BO_SELECT_IMAGE,                  ///< Preview image in the #WID_BO_SELECT_MATRIX.
src/widgets/object_widget.h
Show inline comments
 
@@ -18,7 +18,8 @@ enum BuildObjectWidgets {
 
	WID_BO_SCROLLBAR,      ///< The scrollbar associated with the list.
 
	WID_BO_OBJECT_MATRIX,  ///< The matrix with preview sprites.
 
	WID_BO_OBJECT_SPRITE,  ///< A preview sprite of the object.
 
	WID_BO_OBJECT_SIZE,    ///< The size of an object.
 
	WID_BO_OBJECT_NAME,    ///< The name of the selected object.
 
	WID_BO_OBJECT_SIZE,    ///< The size of the selected object.
 
	WID_BO_INFO,           ///< Other information about the object (from the NewGRF).
 

	
 
	WID_BO_SELECT_MATRIX,  ///< Selection preview matrix of objects of a given class.
0 comments (0 inline, 0 general)