Go to the documentation of this file.
58 void ShowVehicleListWindow(
const Vehicle *v);
94 default: NOT_REACHED();
@ VEH_AIRCRAFT
Aircraft vehicle type.
void StartStopVehicle(const Vehicle *v, bool texteffect)
Executes CMD_START_STOP_VEHICLE for given vehicle.
byte VehicleOrderID
The index of an order within its current vehicle (not pool related)
@ WC_ROADVEH_LIST
Road vehicle list; Window numbers:
uint32 TileIndex
The index/ID of a Tile.
uint height
Vehicle cell height.
@ TDW_TAB_INFO
Tab with name and value of the vehicles.
uint16 mail_capacity
Mail capacity if available.
int GetVehicleWidth(const Vehicle *v, EngineImageType image_type)
Get the width of a vehicle (including all parts of the consist) in pixels.
TrainDetailsWindowTabs
The tabs in the train details window.
void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip=0)
Draws an image of a road vehicle chain.
uint extend_right
Extend of the cell to the right.
EngineImageType
Visualisation contexts of vehicles and engines.
@ VEH_ROAD
Road vehicle type.
Owner
Enum for all companies/owners.
uint capacity
Cargo capacity.
Vehicle * CheckClickOnVehicle(const Viewport *vp, int x, int y)
Find the vehicle close to the clicked coordinates.
VehicleCellSize GetVehicleImageCellSize(VehicleType type, EngineImageType image_type)
Get the GUI cell size for a vehicle image.
@ TDW_TAB_TOTALS
Tab with sum of total cargo transported.
uint16 EngineID
Unique identification number of an engine.
Data structure for viewport, display of a part of the world.
static uint GetVehicleHeight(VehicleType type)
Get the height of a single vehicle in the GUIs.
uint ShowRefitOptionsList(int left, int right, int y, EngineID engine)
Display list of cargo types of the engine, for the purchase information window.
static const VehicleID INVALID_VEHICLE
Constant representing a non-existing vehicle.
'Train' is either a loco or a wagon.
@ WC_SHIPS_LIST
Ships list; Window numbers:
Extra information about refitted cargo and capacity.
WindowClass
Window classes.
@ WC_TRAINS_LIST
Trains list; Window numbers:
StringID GetCargoSubtypeText(const Vehicle *v)
Get the cargo subtype text from NewGRF for the vehicle details window.
void DrawShipImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type)
Draws an image of a ship.
VehicleType
Available vehicle types.
@ VIWD_CONSIST_CHANGED
Vehicle composition was changed.
int GetSingleVehicleWidth(const Vehicle *v, EngineImageType image_type)
Get the width of a vehicle (part) in pixels.
void DrawVehicleImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip)
Draws an image of a vehicle chain.
static WindowClass GetWindowClassForVehicleType(VehicleType vt)
Get WindowClass for vehicle list of given vehicle type.
void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
Set the mouse cursor to look like a vehicle.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
@ TDW_TAB_CAPACITY
Tab with cargo capacity of the vehicles.
@ VIWD_AUTOREPLACE
Autoreplace replaced the vehicle.
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit=false)
Show the refit window for a vehicle.
Dimensions of a cell in the purchase/depot windows.
int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number, TestedEngineDetails &te)
Draw the purchase info details of a vehicle at a given location.
void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type)
Draws an image of an aircraft.
uint32 VehicleID
The type all our vehicle IDs have.
VehicleInvalidateWindowData
Special values for vehicle-related windows for the data parameter of InvalidateWindowData.
byte CargoID
Cargo slots to indicate a cargo type within a game.
Data structure for an opened window.
@ VEH_TRAIN
Train vehicle type.
@ VIWD_MODIFY_ORDERS
Other order modifications.
@ VEH_SHIP
Ship vehicle type.
@ VIWD_REMOVE_ALL_ORDERS
Removed / replaced all orders (after deleting / sharing).
@ WC_AIRCRAFT_LIST
Aircraft list; Window numbers:
uint extend_left
Extend of the cell to the left.
void ShowVehicleViewWindow(const Vehicle *v)
Shows the vehicle view window of the given vehicle.
bool VehicleClicked(const Vehicle *v)
Dispatch a "vehicle selected" event if any window waits for it.
void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip, VehicleID drag_dest=INVALID_VEHICLE)
Draws an image of a whole train.
@ TDW_TAB_CARGO
Tab with cargo carried by the vehicles.