2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2004-09-06 18:15:13 +00:00
|
|
|
#ifndef VEHICLE_GUI_H
|
|
|
|
#define VEHICLE_GUI_H
|
|
|
|
|
2006-08-29 17:41:13 +00:00
|
|
|
#include "window.h"
|
2005-05-02 23:59:11 +00:00
|
|
|
|
2005-09-18 20:56:44 +00:00
|
|
|
void DrawVehicleProfitButton(const Vehicle *v, int x, int y);
|
2006-09-27 07:23:38 +00:00
|
|
|
void ShowVehicleRefitWindow(const Vehicle *v);
|
2005-01-22 20:23:18 +00:00
|
|
|
void InitializeVehiclesGuiList(void);
|
2004-09-06 18:15:13 +00:00
|
|
|
|
|
|
|
/* sorter stuff */
|
2004-12-10 18:16:08 +00:00
|
|
|
void RebuildVehicleLists(void);
|
|
|
|
void ResortVehicleLists(void);
|
|
|
|
|
2004-09-06 18:15:13 +00:00
|
|
|
#define PERIODIC_RESORT_DAYS 10
|
|
|
|
|
2006-08-29 21:36:39 +00:00
|
|
|
/* Vehicle List Window type flags */
|
|
|
|
enum {
|
2006-09-04 15:16:58 +00:00
|
|
|
VLW_STANDARD = 0 << 8,
|
2006-08-29 21:36:39 +00:00
|
|
|
VLW_SHARED_ORDERS = 1 << 8,
|
|
|
|
VLW_STATION_LIST = 2 << 8,
|
2006-09-04 15:16:58 +00:00
|
|
|
VLW_MASK = 0x700,
|
2006-08-29 21:36:39 +00:00
|
|
|
};
|
|
|
|
|
2006-09-01 10:24:15 +00:00
|
|
|
static inline bool ValidVLWFlags(uint16 flags)
|
|
|
|
{
|
|
|
|
return (flags == VLW_STANDARD || flags == VLW_SHARED_ORDERS || flags == VLW_STATION_LIST);
|
|
|
|
}
|
|
|
|
|
2006-08-29 17:41:13 +00:00
|
|
|
void PlayerVehWndProc(Window *w, WindowEvent *e);
|
|
|
|
|
2005-06-05 23:01:10 +00:00
|
|
|
void DrawTrainEnginePurchaseInfo(int x, int y, EngineID engine_number);
|
|
|
|
void DrawTrainWagonPurchaseInfo(int x, int y, EngineID engine_number);
|
|
|
|
void DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number);
|
|
|
|
void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number);
|
|
|
|
void DrawShipPurchaseInfo(int x, int y, EngineID engine_number);
|
2005-01-02 17:23:04 +00:00
|
|
|
|
2006-08-29 17:41:13 +00:00
|
|
|
void DrawTrainImage(const Vehicle *v, int x, int y, int count, int skip, VehicleID selection);
|
|
|
|
void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection);
|
|
|
|
void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection);
|
|
|
|
void DrawSmallOrderListShip(const Vehicle *v, int x, int y);
|
2006-09-03 23:27:38 +00:00
|
|
|
void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection);
|
|
|
|
void DrawSmallOrderListAircraft(const Vehicle *v, int x, int y);
|
2006-08-29 17:41:13 +00:00
|
|
|
|
|
|
|
void ShowBuildTrainWindow(TileIndex tile);
|
|
|
|
void ShowBuildRoadVehWindow(TileIndex tile);
|
|
|
|
void ShowBuildShipWindow(TileIndex tile);
|
|
|
|
void ShowBuildAircraftWindow(TileIndex tile);
|
|
|
|
|
2005-10-24 19:40:48 +00:00
|
|
|
void ChangeVehicleViewWindow(const Vehicle *from_v, const Vehicle *to_v);
|
|
|
|
|
2006-09-03 23:27:38 +00:00
|
|
|
int ShowAdditionalText(int x, int y, int w, EngineID engine);
|
2005-10-24 19:40:48 +00:00
|
|
|
|
2004-09-06 18:15:13 +00:00
|
|
|
#endif /* VEHICLE_GUI_H */
|