diff options
Diffstat (limited to 'src/vehicle_gui_base.h')
-rw-r--r-- | src/vehicle_gui_base.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index c63d5ec18..f89b81ffb 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -49,6 +49,7 @@ struct BaseVehicleListWindow : public Window { enum GroupBy : byte { GB_NONE, + GB_SHARED_ORDERS, GB_END, }; @@ -92,12 +93,26 @@ struct BaseVehicleListWindow : public Window { const StringID *GetVehicleSorterNames() { - return vehicle_group_none_sorter_names; + switch (this->grouping) { + case GB_NONE: + return vehicle_group_none_sorter_names; + case GB_SHARED_ORDERS: + return vehicle_group_shared_orders_sorter_names; + default: + NOT_REACHED(); + } } VehicleGroupSortFunction * const *GetVehicleSorterFuncs() { - return vehicle_group_none_sorter_funcs; + switch (this->grouping) { + case GB_NONE: + return vehicle_group_none_sorter_funcs; + case GB_SHARED_ORDERS: + return vehicle_group_shared_orders_sorter_funcs; + default: + NOT_REACHED(); + } } }; |