summaryrefslogtreecommitdiff
path: root/window.h
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-01-26 17:10:11 +0000
committerDarkvater <darkvater@openttd.org>2006-01-26 17:10:11 +0000
commit070edf2f73efab7e72a0a3671922cbb21ec9c309 (patch)
treeb020a36d72fcf2465b24fb8a34fc2902bbeb0061 /window.h
parent2612d485506311f7bc9858af2bd8702939058f84 (diff)
downloadopenttd-070edf2f73efab7e72a0a3671922cbb21ec9c309.tar.xz
(svn r3441) - Feature: Allow the network game list to be sorted (by name/clients/compatibility ascending/descending)
Diffstat (limited to 'window.h')
-rw-r--r--window.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/window.h b/window.h
index 7f09f2f25..42f71d125 100644
--- a/window.h
+++ b/window.h
@@ -431,9 +431,9 @@ typedef struct {
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(scroller_d));
typedef enum VehicleListFlags {
- VL_DESC = 0x01,
- VL_RESORT = 0x02,
- VL_REBUILD = 0x04
+ VL_DESC = 0x01, // sort descending or ascending
+ VL_RESORT = 0x02, // instruct the code to resort the list in the next loop
+ VL_REBUILD = 0x04 // create sort-listing to use for qsort and friends
} VehicleListFlags;
typedef struct vehiclelist_d {
@@ -445,6 +445,14 @@ typedef struct vehiclelist_d {
} vehiclelist_d;
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vehiclelist_d));
+typedef struct list_d {
+ uint16 list_length; // length of the list being sorted
+ byte sort_type; // what criteria to sort on
+ VehicleListFlags flags;// used to control sorting/resorting/etc.
+ uint16 resort_timer; // resort list after a given amount of ticks if set
+} list_d;
+assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(list_d));
+
typedef struct message_d {
int msg;
int wparam;