(svn r17850) -Codechange: remove most usage of delta on OnResize

pull/155/head
rubidium 15 years ago
parent 343586484b
commit 51936e1903

@ -1172,10 +1172,7 @@ struct BuildVehicleWindow : Window {
virtual void OnResize(Point delta)
{
if (delta.x != 0 && !this->listview_mode) {
ResizeButtons(this, BUILD_VEHICLE_WIDGET_BUILD, BUILD_VEHICLE_WIDGET_RENAME);
}
if (delta.y == 0) return;
if (!this->listview_mode) ResizeButtons(this, BUILD_VEHICLE_WIDGET_BUILD, BUILD_VEHICLE_WIDGET_RENAME);
this->vscroll.SetCapacity((this->widget[BUILD_VEHICLE_WIDGET_LIST].bottom - this->widget[BUILD_VEHICLE_WIDGET_LIST].top + 1) / GetVehicleListHeight(this->vehicle_type));
this->widget[BUILD_VEHICLE_WIDGET_LIST].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);

@ -1135,7 +1135,7 @@ public:
virtual void OnResize(Point delta)
{
if (delta.x != 0 && this->map_type == SMT_INDUSTRY) this->ResizeLegend();
if (this->map_type == SMT_INDUSTRY) this->ResizeLegend();
}
void SmallMapCenterOnCurrentPos()

@ -1051,7 +1051,7 @@ struct StationViewWindow : public Window {
virtual void OnResize(Point delta)
{
if (delta.x != 0) ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
this->vscroll.SetCapacity((this->widget[SVW_WAITING].bottom - this->widget[SVW_WAITING].top + 1) / this->resize.step_height);
}
};

@ -1498,8 +1498,7 @@ struct VehicleDetailsWindow : Window {
virtual void OnResize(Point delta)
{
if (delta.x != 0) ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO);
if (delta.y == 0) return;
ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO);
this->vscroll.SetCapacity((this->widget[VLD_WIDGET_MIDDLE_DETAILS].bottom - this->widget[VLD_WIDGET_MIDDLE_DETAILS].top + 1) / 14);
this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);

Loading…
Cancel
Save