@@ -1178,25 +1178,25 @@ struct BuildVehicleWindow : Window {
virtual void OnResize()
{
this->vscroll.SetCapacity((this->GetWidget<NWidgetCore>(BUILD_VEHICLE_WIDGET_LIST)->current_y) / this->resize.step_height);
this->GetWidget<NWidgetCore>(BUILD_VEHICLE_WIDGET_LIST)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
};
static const WindowDesc _build_vehicle_desc(
WDP_AUTO, WDP_AUTO, 240, 186, 240, 268,
WC_BUILD_VEHICLE, WC_NONE,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION,
NULL, _nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets)
_nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets)
);
void ShowBuildVehicleWindow(TileIndex tile, VehicleType type)
/* We want to be able to open both Available Train as Available Ships,
* so if tile == INVALID_TILE (Available XXX Window), use 'type' as unique number.
* As it always is a low value, it won't collide with any real tile
* number. */
uint num = (tile == INVALID_TILE) ? (int)type : tile;
assert(IsCompanyBuildableVehicleType(type));