summaryrefslogtreecommitdiff
path: root/window.h
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-11-30 16:03:12 +0000
committerKUDr <kudr@openttd.org>2006-11-30 16:03:12 +0000
commit1235172cc7392325a0f14c2e5d9ab08fadf9fb8c (patch)
treed0b937c0d86acf0c61f997be2286c510c5fbf5d4 /window.h
parent3e6f89ca7e76c078af713b41cfdece5470b9983c (diff)
downloadopenttd-1235172cc7392325a0f14c2e5d9ab08fadf9fb8c.tar.xz
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit:
- using one engine list instead of 3 - removed engine filters (loco, wagons, helicopters, etc.) - EngineList code isolated from GUI (moved to helpers.cpp - reusing CBlobT code which does exactly what is needed for EngineList) - removed unnecessary "optimization" (rebuild and sort engine list on each WE_PAINT)
Diffstat (limited to 'window.h')
-rw-r--r--window.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/window.h b/window.h
index 1c1aed22c..39a5f8837 100644
--- a/window.h
+++ b/window.h
@@ -396,20 +396,16 @@ assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(tooltips_d));
typedef struct {
byte vehicle_type;
- byte railtype;
+ union {
+ byte railtype;
+ byte acc_planes; // AIRCRAFT_ONLY, ALL, HELICOPTERS_ONLY
+ } filter;
byte sel_index;
- byte show_engine_button;
- bool data_invalidated;
- bool decenting_sort_order;
+ bool descending_sort_order;
byte sort_criteria;
EngineID sel_engine;
EngineID rename_engine;
- EngineID *list_a;
- EngineID *list_b;
- EngineID *list_c;
- uint16 list_a_length;
- uint16 list_b_length;
- uint16 list_c_length;
+ EngineList eng_list;
} buildvehicle_d;
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(buildvehicle_d));