OpenTTD Source  20240919-master-gdf0233f4c2
roadveh_gui.cpp File Reference
#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. More...
 
void DrawRoadVehImage (const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip)
 Draws an image of a road vehicle chain. More...
 

Detailed Description

GUI for road vehicles.

Definition in file roadveh_gui.cpp.

Function Documentation

◆ DrawRoadVehDetails()

void DrawRoadVehDetails ( const Vehicle v,
const Rect r 
)

Draw the details for the given vehicle at the given position.

Parameters
vcurrent vehicle
rthe Rect to draw within

Definition at line 29 of file roadveh_gui.cpp.

Referenced by VehicleDetailsWindow::DrawVehicleDetails().

◆ DrawRoadVehImage()

void DrawRoadVehImage ( const Vehicle v,
const Rect r,
VehicleID  selection,
EngineImageType  image_type,
int  skip 
)

Draws an image of a road vehicle chain.

Parameters
vFront vehicle
rRect to draw at
selectionSelected vehicle to draw a frame around
skipNumber of pixels to skip at the front (for scrolling)

Definition at line 122 of file roadveh_gui.cpp.

References _current_text_dir, DIR_E, DIR_W, FillDrawPixelInfo(), SpecializedVehicle< RoadVehicle, Type >::From(), TD_RTL, and Rect::Width().

Referenced by DrawVehicleImage().