OpenTTD Source 20241224-master-gf74b0cf984
|
GUI for road vehicles. More...
#include "stdafx.h"
#include "core/backup_type.hpp"
#include "roadveh.h"
#include "window_gui.h"
#include "strings_func.h"
#include "vehicle_func.h"
#include "string_func.h"
#include "zoom_func.h"
#include "table/strings.h"
#include "safeguards.h"
Go to the source code of this file.
Functions | |
void | DrawRoadVehDetails (const Vehicle *v, const Rect &r) |
Draw the details for the given vehicle at the given position. | |
void | DrawRoadVehImage (const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip) |
Draws an image of a road vehicle chain. | |
GUI for road vehicles.
Definition in file roadveh_gui.cpp.
Draw the details for the given vehicle at the given position.
v | current vehicle |
r | the Rect to draw within |
Definition at line 29 of file roadveh_gui.cpp.
References _sorted_cargo_specs, AppendStringInPlace(), Vehicle::build_year, Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, DrawString(), Vehicle::engine_type, FS_NORMAL, GetCargoSubtypeText(), GetCharacterHeight(), VehicleCargoList::GetFeederShare(), VehicleCargoList::GetFirstStation(), GetListSeparator(), GetString(), Vehicle::HasArticulatedPart(), Vehicle::Next(), PackEngineNameDParam(), WidgetDimensions::scaled, ScaleSpriteTrad(), SetDParam(), VehicleCargoList::StoredCount(), Vehicle::value, VehicleDetails, and WidgetDimensions::vsep_normal.
Referenced by VehicleDetailsWindow::DrawVehicleDetails().
void DrawRoadVehImage | ( | const Vehicle * | v, |
const Rect & | r, | ||
VehicleID | selection, | ||
EngineImageType | image_type, | ||
int | skip | ||
) |
Draws an image of a road vehicle chain.
v | Front vehicle |
r | Rect 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 123 of file roadveh_gui.cpp.
References _current_text_dir, AddCargoIconOverlay(), WidgetDimensions::bevel, CenterBounds(), DIR_E, DIR_W, VehicleSpriteSeq::Draw(), DrawCargoIconOverlays(), DrawFrameRect(), Rect::Expand(), FillDrawPixelInfo(), FR_BORDERONLY, SpecializedVehicle< T, Type >::From(), RoadVehicle::GetDisplayImageWidth(), RoadVehicle::GetImage(), GetVehiclePalette(), Rect::Height(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, SpecializedVehicle< T, Type >::Next(), PALETTE_CRASH, WidgetDimensions::scaled, ScaleSpriteTrad(), ShowCargoIconOverlay(), TD_RTL, Rect::Translate(), Vehicle::vehstatus, VS_CRASHED, and Rect::Width().
Referenced by DrawVehicleImage(), and DepotWindow::DrawVehicleInDepot().