summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-06-30 14:36:31 +0000
committerfrosch <frosch@openttd.org>2013-06-30 14:36:31 +0000
commit43ec0bf0c118b5228a9c50a2ba1650d021dc5c44 (patch)
tree5aef49476d90a8b682f809125c8c37d035a1c9fa /src/network
parent8116aeff218fe55c98c0dcd2a62390fe7e7d9c6e (diff)
downloadopenttd-43ec0bf0c118b5228a9c50a2ba1650d021dc5c44.tar.xz
(svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content_gui.cpp3
-rw-r--r--src/network/network_gui.cpp6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index fe0668f05..358187cc2 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -869,7 +869,6 @@ public:
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_NCL_MATRIX);
- this->GetWidget<NWidgetCore>(WID_NCL_MATRIX)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
virtual void OnReceiveContentInfo(const ContentInfo *rci)
@@ -983,7 +982,7 @@ static const NWidgetPart _nested_network_content_list_widgets[] = {
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NCL_NAME), SetResize(1, 0), SetFill(1, 0),
SetDataTip(STR_CONTENT_NAME_CAPTION, STR_CONTENT_NAME_CAPTION_TOOLTIP),
EndContainer(),
- NWidget(WWT_MATRIX, COLOUR_LIGHT_BLUE, WID_NCL_MATRIX), SetResize(1, 14), SetFill(1, 1), SetScrollbar(WID_NCL_SCROLLBAR), SetMatrixDataTip(0, 0, STR_CONTENT_MATRIX_TOOLTIP),
+ NWidget(WWT_MATRIX, COLOUR_LIGHT_BLUE, WID_NCL_MATRIX), SetResize(1, 14), SetFill(1, 1), SetScrollbar(WID_NCL_SCROLLBAR), SetMatrixDataTip(1, 0, STR_CONTENT_MATRIX_TOOLTIP),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_LIGHT_BLUE, WID_NCL_SCROLLBAR),
EndContainer(),
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index e4af9d5b9..be028355e 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -890,7 +890,6 @@ public:
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_NG_MATRIX);
- this->GetWidget<NWidgetCore>(WID_NG_MATRIX)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
virtual void OnTick()
@@ -946,7 +945,7 @@ static const NWidgetPart _nested_network_game_widgets[] = {
NWidget(NWID_VERTICAL),
NWidgetFunction(MakeResizableHeader),
NWidget(WWT_MATRIX, COLOUR_LIGHT_BLUE, WID_NG_MATRIX), SetResize(1, 1), SetFill(1, 0),
- SetMatrixDataTip(0, 0, STR_NETWORK_SERVER_LIST_CLICK_GAME_TO_SELECT), SetScrollbar(WID_NG_SCROLLBAR),
+ SetMatrixDataTip(1, 0, STR_NETWORK_SERVER_LIST_CLICK_GAME_TO_SELECT), SetScrollbar(WID_NG_SCROLLBAR),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_LIGHT_BLUE, WID_NG_SCROLLBAR),
EndContainer(),
@@ -1572,7 +1571,6 @@ struct NetworkLobbyWindow : public Window {
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_NL_MATRIX);
- this->GetWidget<NWidgetCore>(WID_NL_MATRIX)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
};
@@ -1588,7 +1586,7 @@ static const NWidgetPart _nested_network_lobby_window_widgets[] = {
/* Company list. */
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_WHITE, WID_NL_HEADER), SetMinimalSize(146, 0), SetResize(1, 0), SetFill(1, 0), EndContainer(),
- NWidget(WWT_MATRIX, COLOUR_LIGHT_BLUE, WID_NL_MATRIX), SetMinimalSize(146, 0), SetResize(1, 1), SetFill(1, 1), SetMatrixDataTip(0, 0, STR_NETWORK_GAME_LOBBY_COMPANY_LIST_TOOLTIP), SetScrollbar(WID_NL_SCROLLBAR),
+ NWidget(WWT_MATRIX, COLOUR_LIGHT_BLUE, WID_NL_MATRIX), SetMinimalSize(146, 0), SetResize(1, 1), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_NETWORK_GAME_LOBBY_COMPANY_LIST_TOOLTIP), SetScrollbar(WID_NL_SCROLLBAR),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_LIGHT_BLUE, WID_NL_SCROLLBAR),
NWidget(NWID_SPACER), SetMinimalSize(5, 0), SetResize(0, 1),