mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r27799) -Add: Display aircraft type in buy window (patch by Samu)
This commit is contained in:
parent
85ed4975bf
commit
319de74d99
|
@ -719,7 +719,15 @@ static int DrawShipPurchaseInfo(int left, int right, int y, EngineID engine_numb
|
|||
return y;
|
||||
}
|
||||
|
||||
/* Draw aircraft specific details */
|
||||
/**
|
||||
* Draw aircraft specific details in the buy window.
|
||||
* @param left Left edge of the window to draw in.
|
||||
* @param right Right edge of the window to draw in.
|
||||
* @param y Top of the area to draw in.
|
||||
* @param engine_number Engine to display.
|
||||
* @param refittable If set, the aircraft can be refitted.
|
||||
* @return Bottom of the used area.
|
||||
*/
|
||||
static int DrawAircraftPurchaseInfo(int left, int right, int y, EngineID engine_number, bool refittable)
|
||||
{
|
||||
const Engine *e = Engine::Get(engine_number);
|
||||
|
@ -755,6 +763,12 @@ static int DrawAircraftPurchaseInfo(int left, int right, int y, EngineID engine_
|
|||
DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
|
||||
/* Aircraft type */
|
||||
SetDParam(0, e->GetAircraftTypeText());
|
||||
DrawString(left, right, y, STR_PURCHASE_INFO_AIRCRAFT_TYPE);
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
|
||||
/* Aircraft range, if available. */
|
||||
uint16 range = e->GetRange();
|
||||
if (range != 0) {
|
||||
SetDParam(0, range);
|
||||
|
|
|
@ -3398,6 +3398,7 @@ STR_PURCHASE_INFO_ALL_TYPES :All cargo types
|
|||
STR_PURCHASE_INFO_ALL_BUT :All but {CARGO_LIST}
|
||||
STR_PURCHASE_INFO_MAX_TE :{BLACK}Max. Tractive Effort: {GOLD}{FORCE}
|
||||
STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Range: {GOLD}{COMMA} tiles
|
||||
STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK}Aircraft type: {GOLD}{STRING}
|
||||
|
||||
STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click for toggling hiding of the vehicle type
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click for toggling hiding of the vehicle type
|
||||
|
|
Loading…
Reference in New Issue