GUI for ships. More...
#include "stdafx.h"#include "vehicle_base.h"#include "window_gui.h"#include "gfx_func.h"#include "vehicle_gui.h"#include "strings_func.h"#include "vehicle_func.h"#include "spritecache.h"#include "table/strings.h"Go to the source code of this file.
Functions | |
| void | DrawShipImage (const Vehicle *v, int left, int right, int y, VehicleID selection) |
| Draws an image of a ship. | |
| void | DrawShipDetails (const Vehicle *v, int left, int right, int y) |
| Draw the details for the given vehicle at the given position. | |
GUI for ships.
Definition in file ship_gui.cpp.
| void DrawShipDetails | ( | 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 57 of file ship_gui.cpp.
References Vehicle::cargo, Vehicle::cargo_cap, Vehicle::cargo_type, CargoList< Tinst >::Count(), DrawString(), CargoList< Tinst >::Empty(), VehicleCargoList::FeederShare(), FONT_HEIGHT_NORMAL, GetCargoSubtypeText(), SA_LEFT, SA_STRIP, SetDParam(), CargoList< Tinst >::Source(), and Vehicle::value.
Referenced by VehicleDetailsWindow::DrawVehicleDetails().
Draws an image of a ship.
| 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 |
Definition at line 31 of file ship_gui.cpp.
References _dynlang, DIR_E, DIR_W, DrawFrameRect(), DrawSprite(), FR_BORDERONLY, Vehicle::GetImage(), GetVehiclePalette(), Sprite::height, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, ST_NORMAL, TD_RTL, DynamicLanguages::text_dir, Sprite::width, Sprite::x_offs, and Sprite::y_offs.
Referenced by DrawVehicleImage(), and DepotWindow::DrawVehicleInDepot().
1.6.1