Mercurial > hg > openttd
changeset 17064:23990d00e37d draft
(svn r21801) -Fix (r21772): Attach scrollbar to select matrix in object gui.
author | alberth <alberth@openttd.org> |
---|---|
date | Sat, 15 Jan 2011 14:17:53 +0000 |
parents | 9f041188fc49 |
children | 421d71eb2bd9 |
files | src/object_gui.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -64,7 +64,9 @@ this->SelectFirstAvailableObject(true); this->GetWidget<NWidgetMatrix>(BOW_OBJECT_MATRIX)->SetCount(4); - this->GetWidget<NWidgetMatrix>(BOW_SELECT_MATRIX)->SetCount(ObjectClass::GetCount(_selected_object_class)); + NWidgetMatrix *matrix = this->GetWidget<NWidgetMatrix>(BOW_SELECT_MATRIX); + matrix->SetScrollbar(this->GetScrollbar(BOW_SELECT_SCROLL)); + matrix->SetCount(ObjectClass::GetCount(_selected_object_class)); } virtual ~BuildObjectWindow() @@ -379,7 +381,7 @@ EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetScrollbar(BOW_SELECT_SCROLL), NWidget(NWID_HORIZONTAL), - NWidget(NWID_MATRIX, COLOUR_DARK_GREEN, BOW_SELECT_MATRIX), SetFill(0, 1), SetPIP(0, 2, 0), SetScrollbar(BOW_SELECT_SCROLL), + NWidget(NWID_MATRIX, COLOUR_DARK_GREEN, BOW_SELECT_MATRIX), SetFill(0, 1), SetPIP(0, 2, 0), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BOW_SELECT_IMAGE), SetMinimalSize(66, 60), SetDataTip(0x0, STR_OBJECT_BUILD_TOOLTIP), SetFill(0, 0), SetResize(0, 0), SetScrollbar(BOW_SELECT_SCROLL), EndContainer(),