summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content_gui.cpp2
-rw-r--r--src/network/network_gui.cpp10
2 files changed, 5 insertions, 7 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index b91aa02f2..7d3c223db 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -730,7 +730,7 @@ public:
virtual void OnResize()
{
- this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(NCLWW_MATRIX)->current_y / this->resize.step_height);
+ this->vscroll.SetCapacityFromWidget(this, NCLWW_MATRIX);
this->GetWidget<NWidgetCore>(NCLWW_MATRIX)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 4ba226266..514f38521 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -895,9 +895,8 @@ public:
virtual void OnResize()
{
- NWidgetCore *nwi = this->GetWidget<NWidgetCore>(NGWW_MATRIX);
- this->vscroll.SetCapacity(nwi->current_y / this->resize.step_height);
- nwi->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
+ this->vscroll.SetCapacityFromWidget(this, NGWW_MATRIX);
+ this->GetWidget<NWidgetCore>(NGWW_MATRIX)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
};
@@ -1673,9 +1672,8 @@ struct NetworkLobbyWindow : public Window {
virtual void OnResize()
{
- NWidgetCore *nwi = this->GetWidget<NWidgetCore>(NLWW_MATRIX);
- this->vscroll.SetCapacity(nwi->current_y / this->resize.step_height);
- nwi->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
+ this->vscroll.SetCapacityFromWidget(this, NLWW_MATRIX);
+ this->GetWidget<NWidgetCore>(NLWW_MATRIX)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
};