diff options
author | rubidium <rubidium@openttd.org> | 2009-10-24 14:53:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-10-24 14:53:55 +0000 |
commit | ca0521f89fc53be22e18cb56f6d9c358555246af (patch) | |
tree | 709e00edcb606c69ea67ffbf1ba2a115c0bedb70 /src/vehicle_gui.cpp | |
parent | c3992ab7b69461189f217be73136997cd097ee62 (diff) | |
download | openttd-ca0521f89fc53be22e18cb56f6d9c358555246af.tar.xz |
(svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index c69dfc944..5420442dd 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -387,7 +387,7 @@ struct RefitWindow : public Window { } } - virtual void OnResize(Point delta) + virtual void OnResize() { this->vscroll.SetCapacity((this->widget[VRW_MATRIX].bottom - this->widget[VRW_MATRIX].top + 1) / this->resize.step_height); this->widget[VRW_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); @@ -1103,7 +1103,7 @@ struct VehicleListWindow : public BaseVehicleListWindow { } } - virtual void OnResize(Point delta) + virtual void OnResize() { this->vscroll.SetCapacity((this->widget[VLW_WIDGET_LIST].bottom - this->widget[VLW_WIDGET_LIST].top + 1) / this->resize.step_height); this->widget[VLW_WIDGET_LIST].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); @@ -1496,7 +1496,7 @@ struct VehicleDetailsWindow : Window { DoCommandP(0, this->window_number, 0, CMD_RENAME_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN + Vehicle::Get(this->window_number)->type), NULL, str); } - virtual void OnResize(Point delta) + virtual void OnResize() { ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO); @@ -1920,7 +1920,7 @@ public: } } - virtual void OnResize(Point delta) + virtual void OnResize() { if (this->viewport != NULL) { NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(VVW_WIDGET_VIEWPORT); |