2005-07-24 16:12:37 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
2004-09-06 20:15:13 +02:00
|
|
|
#ifndef VEHICLE_GUI_H
|
|
|
|
#define VEHICLE_GUI_H
|
|
|
|
|
2005-09-27 20:51:04 +02:00
|
|
|
#include "station.h"
|
2005-05-03 01:59:11 +02:00
|
|
|
#include "vehicle.h"
|
2006-08-29 19:41:13 +02:00
|
|
|
#include "window.h"
|
2005-05-03 01:59:11 +02:00
|
|
|
|
2004-12-10 19:16:08 +01:00
|
|
|
struct vehiclelist_d;
|
|
|
|
|
2005-09-18 22:56:44 +02:00
|
|
|
void DrawVehicleProfitButton(const Vehicle *v, int x, int y);
|
2005-05-14 14:36:16 +02:00
|
|
|
CargoID DrawVehicleRefitWindow(const Vehicle *v, int sel);
|
2005-01-22 21:23:18 +01:00
|
|
|
void InitializeVehiclesGuiList(void);
|
2004-09-06 20:15:13 +02:00
|
|
|
|
|
|
|
/* sorter stuff */
|
2004-12-10 19:16:08 +01:00
|
|
|
void RebuildVehicleLists(void);
|
|
|
|
void ResortVehicleLists(void);
|
|
|
|
|
2006-08-27 00:28:40 +02:00
|
|
|
void BuildVehicleList(struct vehiclelist_d* vl, int type, PlayerID, StationID, uint16 order);
|
2004-12-10 19:16:08 +01:00
|
|
|
void SortVehicleList(struct vehiclelist_d *vl);
|
|
|
|
|
2004-09-06 20:15:13 +02:00
|
|
|
#define PERIODIC_RESORT_DAYS 10
|
2004-09-06 23:20:01 +02:00
|
|
|
#define SORT_BY_UNSORTED 0
|
2004-11-25 07:05:47 +01:00
|
|
|
extern const StringID _vehicle_sort_listing[];
|
2004-09-06 20:15:13 +02:00
|
|
|
|
2005-01-31 12:03:23 +01:00
|
|
|
typedef struct Listing {
|
2006-08-28 20:53:03 +02:00
|
|
|
bool order; // Ascending/descending?
|
|
|
|
byte criteria; // Sorting criteria
|
2005-01-31 12:03:23 +01:00
|
|
|
} Listing;
|
|
|
|
|
|
|
|
typedef struct Sorting {
|
|
|
|
Listing aircraft;
|
|
|
|
Listing roadveh;
|
|
|
|
Listing ship;
|
|
|
|
Listing train;
|
|
|
|
} Sorting;
|
|
|
|
|
2005-07-22 00:15:02 +02:00
|
|
|
extern Sorting _sorting;
|
2005-01-31 12:03:23 +01:00
|
|
|
|
2004-09-06 20:15:13 +02:00
|
|
|
enum {
|
2005-10-22 08:39:32 +02:00
|
|
|
PLY_WND_PRC__OFFSET_TOP_WIDGET = 26,
|
|
|
|
PLY_WND_PRC__SIZE_OF_ROW_SMALL = 26,
|
|
|
|
PLY_WND_PRC__SIZE_OF_ROW_BIG = 36,
|
2004-09-06 20:15:13 +02:00
|
|
|
};
|
|
|
|
|
2006-08-29 19:41:13 +02:00
|
|
|
void PlayerVehWndProc(Window *w, WindowEvent *e);
|
|
|
|
|
2005-01-02 18:23:04 +01:00
|
|
|
void ShowReplaceVehicleWindow(byte vehicletype);
|
|
|
|
|
2005-06-06 01:01:10 +02: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 18:23:04 +01:00
|
|
|
|
2006-08-29 19:41:13 +02: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);
|
|
|
|
|
|
|
|
void ShowBuildTrainWindow(TileIndex tile);
|
|
|
|
void ShowBuildRoadVehWindow(TileIndex tile);
|
|
|
|
void ShowBuildShipWindow(TileIndex tile);
|
|
|
|
void ShowBuildAircraftWindow(TileIndex tile);
|
|
|
|
|
|
|
|
void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection);
|
|
|
|
void DrawSmallOrderListAircraft(const Vehicle *v, int x, int y);
|
|
|
|
|
2005-10-24 21:40:48 +02:00
|
|
|
void ChangeVehicleViewWindow(const Vehicle *from_v, const Vehicle *to_v);
|
|
|
|
|
2006-04-24 00:33:10 +02:00
|
|
|
int ShowAdditionalText(int x, int y, int w, EngineID engine_number);
|
2005-10-24 21:40:48 +02:00
|
|
|
|
2004-09-06 20:15:13 +02:00
|
|
|
#endif /* VEHICLE_GUI_H */
|