author | glx |
Wed, 20 Sep 2006 01:08:50 +0000 | |
changeset 4626 | ce414b54bfc3 |
parent 4546 | 507b7d9bd834 |
child 4642 | e27b0f7e89e9 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
3 |
#ifndef VEHICLE_GUI_H |
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
4 |
#define VEHICLE_GUI_H |
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
5 |
|
4442
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
6 |
#include "window.h" |
1752
d65cd19f7117
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1246
diff
changeset
|
7 |
|
2436
7d5df545bd5d
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2186
diff
changeset
|
8 |
void DrawVehicleProfitButton(const Vehicle *v, int x, int y); |
1802
da61740cc1e7
(svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks"
Darkvater
parents:
1763
diff
changeset
|
9 |
CargoID DrawVehicleRefitWindow(const Vehicle *v, int sel); |
1093
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
842
diff
changeset
|
10 |
void InitializeVehiclesGuiList(void); |
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
11 |
|
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
12 |
/* sorter stuff */ |
588 | 13 |
void RebuildVehicleLists(void); |
14 |
void ResortVehicleLists(void); |
|
15 |
||
168
79f9ed5b23e6
(svn r169) -Fix: move around sort-widgets a bit so it looks more natural
darkvater
parents:
164
diff
changeset
|
16 |
#define PERIODIC_RESORT_DAYS 10 |
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
17 |
|
4449
820974aaa4a6
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
bjarni
parents:
4442
diff
changeset
|
18 |
/* Vehicle List Window type flags */ |
820974aaa4a6
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
bjarni
parents:
4442
diff
changeset
|
19 |
enum { |
4546
507b7d9bd834
(svn r6378) -Codechange: Rename VLW_FLAGS to VLW_MASK as it is a mask
Darkvater
parents:
4545
diff
changeset
|
20 |
VLW_STANDARD = 0 << 8, |
4449
820974aaa4a6
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
bjarni
parents:
4442
diff
changeset
|
21 |
VLW_SHARED_ORDERS = 1 << 8, |
820974aaa4a6
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
bjarni
parents:
4442
diff
changeset
|
22 |
VLW_STATION_LIST = 2 << 8, |
4546
507b7d9bd834
(svn r6378) -Codechange: Rename VLW_FLAGS to VLW_MASK as it is a mask
Darkvater
parents:
4545
diff
changeset
|
23 |
VLW_MASK = 0x700, |
4449
820974aaa4a6
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
bjarni
parents:
4442
diff
changeset
|
24 |
}; |
820974aaa4a6
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
bjarni
parents:
4442
diff
changeset
|
25 |
|
4506
e6a56518135c
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
bjarni
parents:
4485
diff
changeset
|
26 |
static inline bool ValidVLWFlags(uint16 flags) |
e6a56518135c
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
bjarni
parents:
4485
diff
changeset
|
27 |
{ |
e6a56518135c
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
bjarni
parents:
4485
diff
changeset
|
28 |
return (flags == VLW_STANDARD || flags == VLW_SHARED_ORDERS || flags == VLW_STATION_LIST); |
e6a56518135c
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
bjarni
parents:
4485
diff
changeset
|
29 |
} |
e6a56518135c
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
bjarni
parents:
4485
diff
changeset
|
30 |
|
4442
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
31 |
void PlayerVehWndProc(Window *w, WindowEvent *e); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
32 |
|
1907
61bafb476865
(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
hackykid
parents:
1802
diff
changeset
|
33 |
void DrawTrainEnginePurchaseInfo(int x, int y, EngineID engine_number); |
61bafb476865
(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
hackykid
parents:
1802
diff
changeset
|
34 |
void DrawTrainWagonPurchaseInfo(int x, int y, EngineID engine_number); |
61bafb476865
(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
hackykid
parents:
1802
diff
changeset
|
35 |
void DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number); |
61bafb476865
(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
hackykid
parents:
1802
diff
changeset
|
36 |
void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number); |
61bafb476865
(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
hackykid
parents:
1802
diff
changeset
|
37 |
void DrawShipPurchaseInfo(int x, int y, EngineID engine_number); |
842 | 38 |
|
4442
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
39 |
void DrawTrainImage(const Vehicle *v, int x, int y, int count, int skip, VehicleID selection); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
40 |
void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
41 |
void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
42 |
void DrawSmallOrderListShip(const Vehicle *v, int x, int y); |
4542
f42ecc669275
(svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes
Darkvater
parents:
4506
diff
changeset
|
43 |
void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection); |
f42ecc669275
(svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes
Darkvater
parents:
4506
diff
changeset
|
44 |
void DrawSmallOrderListAircraft(const Vehicle *v, int x, int y); |
4442
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
45 |
|
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
46 |
void ShowBuildTrainWindow(TileIndex tile); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
47 |
void ShowBuildRoadVehWindow(TileIndex tile); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
48 |
void ShowBuildShipWindow(TileIndex tile); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
49 |
void ShowBuildAircraftWindow(TileIndex tile); |
9f8bb348d58f
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
bjarni
parents:
4434
diff
changeset
|
50 |
|
2552
5b586a545665
(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplace
bjarni
parents:
2548
diff
changeset
|
51 |
void ChangeVehicleViewWindow(const Vehicle *from_v, const Vehicle *to_v); |
5b586a545665
(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplace
bjarni
parents:
2548
diff
changeset
|
52 |
|
4542
f42ecc669275
(svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes
Darkvater
parents:
4506
diff
changeset
|
53 |
int ShowAdditionalText(int x, int y, int w, EngineID engine); |
2552
5b586a545665
(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplace
bjarni
parents:
2548
diff
changeset
|
54 |
|
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
diff
changeset
|
55 |
#endif /* VEHICLE_GUI_H */ |