Feature: Option to group vehicle lists by shared orders
This applies to all kinds of vehicle lists, as well as the "vehicle groups" window.
This commit is contained in:
committed by
Patric Stout
parent
584df548f1
commit
e59c400ca6
@@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user