|
@@ -409,18 +409,18 @@ static const Widget _vehicle_refit_widge
|
|
|
{ WWT_PANEL, RESIZE_TB, COLOUR_GREY, 0, 239, 140, 161, 0x0, STR_NULL},
|
|
|
{ WWT_PUSHTXTBTN, RESIZE_TB, COLOUR_GREY, 0, 227, 162, 173, 0x0, STR_NULL},
|
|
|
{ WWT_RESIZEBOX, RESIZE_TB, COLOUR_GREY, 228, 239, 162, 173, 0x0, STR_RESIZE_BUTTON},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _vehicle_refit_desc = {
|
|
|
static const WindowDesc _vehicle_refit_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 240, 174, 240, 174,
|
|
|
WC_VEHICLE_REFIT, WC_VEHICLE_VIEW,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION,
|
|
|
_vehicle_refit_widgets,
|
|
|
};
|
|
|
_vehicle_refit_widgets
|
|
|
);
|
|
|
|
|
|
/** Show the refit window for a vehicle
|
|
|
* @param *v The vehicle to show the refit window for
|
|
|
* @param order of the vehicle ( ? )
|
|
|
*/
|
|
|
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent)
|
|
@@ -1131,18 +1131,18 @@ struct VehicleListWindow : public BaseVe
|
|
|
} else {
|
|
|
this->vehicles.ForceResort();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static WindowDesc _vehicle_list_desc = {
|
|
|
static WindowDesc _vehicle_list_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 260, 194, 260, 246,
|
|
|
WC_INVALID, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
|
|
|
_vehicle_list_widgets,
|
|
|
};
|
|
|
_vehicle_list_widgets
|
|
|
);
|
|
|
|
|
|
static void ShowVehicleListWindowLocal(CompanyID company, uint16 VLW_flag, VehicleType vehicle_type, uint16 unique_number)
|
|
|
{
|
|
|
if (!IsValidCompanyID(company)) return;
|
|
|
|
|
|
_vehicle_list_desc.cls = GetWindowClassForVehicleType(vehicle_type);
|
|
@@ -1541,18 +1541,18 @@ struct VehicleDetailsWindow : Window {
|
|
|
this->vscroll.cap += delta.y / 14;
|
|
|
this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.cap << 8) + 1;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/** Vehicle details window descriptor. */
|
|
|
static const WindowDesc _vehicle_details_desc = {
|
|
|
static const WindowDesc _vehicle_details_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 405, 113, 405, 113,
|
|
|
WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
|
|
|
_vehicle_details_widgets,
|
|
|
};
|
|
|
_vehicle_details_widgets
|
|
|
);
|
|
|
|
|
|
/** Shows the vehicle details window of the given vehicle. */
|
|
|
static void ShowVehicleDetailsWindow(const Vehicle *v)
|
|
|
{
|
|
|
DeleteWindowById(WC_VEHICLE_ORDERS, v->index, false);
|
|
|
DeleteWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
|
|
@@ -1582,28 +1582,28 @@ static const Widget _vehicle_view_widget
|
|
|
{ WWT_PUSHIMGBTN, RESIZE_LR, COLOUR_GREY, 232, 249, 50, 67, SPR_IGNORE_SIGNALS, STR_884A_FORCE_TRAIN_TO_PROCEED }, // VVW_WIDGET_FORCE_PROCEED
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
|
|
|
/** Vehicle view window descriptor for all vehicles but trains. */
|
|
|
static const WindowDesc _vehicle_view_desc = {
|
|
|
static const WindowDesc _vehicle_view_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 250, 116, 250, 116,
|
|
|
WC_VEHICLE_VIEW, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
|
|
|
_vehicle_view_widgets,
|
|
|
};
|
|
|
_vehicle_view_widgets
|
|
|
);
|
|
|
|
|
|
/** Vehicle view window descriptor for trains. Only minimum_height and
|
|
|
* default_height are different for train view.
|
|
|
*/
|
|
|
static const WindowDesc _train_view_desc = {
|
|
|
static const WindowDesc _train_view_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 250, 134, 250, 134,
|
|
|
WC_VEHICLE_VIEW, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
|
|
|
_vehicle_view_widgets,
|
|
|
};
|
|
|
_vehicle_view_widgets
|
|
|
);
|
|
|
|
|
|
|
|
|
/* Just to make sure, nobody has changed the vehicle type constants, as we are
|
|
|
using them for array indexing in a number of places here. */
|
|
|
assert_compile(VEH_TRAIN == 0);
|
|
|
assert_compile(VEH_ROAD == 1);
|