GUI for road vehicles. More...
#include "stdafx.h"
#include "roadveh.h"
#include "window_gui.h"
#include "gfx_func.h"
#include "vehicle_gui.h"
#include "strings_func.h"
#include "vehicle_func.h"
#include "string_func.h"
#include "table/sprites.h"
#include "table/strings.h"
Go to the source code of this file.
Functions | |
void | DrawRoadVehDetails (const Vehicle *v, int left, int right, int y) |
Draw the details for the given vehicle at the given position. | |
void | DrawRoadVehImage (const Vehicle *v, int left, int right, int y, VehicleID selection, int skip) |
Draws an image of a road vehicle chain. |
GUI for road vehicles.
Definition in file roadveh_gui.cpp.
void DrawRoadVehDetails | ( | const Vehicle * | v, | |
int | left, | |||
int | right, | |||
int | y | |||
) |
Draw the details for the given vehicle at the given position.
v | current vehicle | |
left | The left most coordinate to draw | |
right | The right most coordinate to draw | |
y | The y coordinate |
Definition at line 32 of file roadveh_gui.cpp.
References Vehicle::build_year, Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, CargoList< Tinst >::Count(), DrawString(), CargoList< Tinst >::Empty(), Vehicle::engine_type, VehicleCargoList::FeederShare(), FONT_HEIGHT_NORMAL, GetCargoSubtypeText(), Vehicle::HasArticulatedPart(), lastof, Vehicle::Next(), SA_LEFT, SA_STRIP, SetDParam(), CargoList< Tinst >::Source(), strecat(), and Vehicle::value.
Referenced by VehicleDetailsWindow::DrawVehicleDetails().
void DrawRoadVehImage | ( | const Vehicle * | v, | |
int | left, | |||
int | right, | |||
int | y, | |||
VehicleID | selection, | |||
int | skip | |||
) |
Draws an image of a road vehicle chain.
v | Front vehicle | |
left | The minimum horizontal position | |
right | The maximum horizontal position | |
y | Vertical position to draw at | |
selection | Selected vehicle to draw a frame around | |
skip | Number of pixels to skip at the front (for scrolling) |
Definition at line 131 of file roadveh_gui.cpp.
References _current_text_dir, DIR_E, DrawFrameRect(), DrawSprite(), FillDrawPixelInfo(), FR_BORDERONLY, SpecializedVehicle< RoadVehicle, Type >::From(), GetVehiclePalette(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, and SpecializedVehicle< T, Type >::Next().
Referenced by DrawVehicleImage(), and DepotWindow::DrawVehicleInDepot().