Base types for having sorted lists in GUIs.
uint32 PaletteID
The number of the palette.
StringID GetEngineCategoryName(EngineID engine)
Return the category of an engine.
bool _engine_sort_last_order[]
Last set direction of the sort order, for each vehicle type.
const StringID _engine_sort_listing[][12]
Dropdown menu strings for the vehicle sort criteria.
Types related to engines.
EngineImageType
Visualisation contexts of vehicles and engines.
Data structure for an opened window.
VehicleType
Available vehicle types.
void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type)
Draw an engine.
void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items)
Sort selected range of items (on indices @ <begin, begin+num_items-1>)
StringID GetEngineInfoString(EngineID engine)
Get a multi-line string with some technical data, describing the engine.
EngList_SortTypeFunction *const _engine_sort_functions[][11]
Sort functions for the vehicle sort criteria, for each vehicle type.
void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare)
Sort all items using quick sort and given 'CompareItems' function.
uint GetEngineListHeight(VehicleType type)
Get the height of a single 'entry' in the engine lists.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
void DisplayVehicleSortDropDown(Window *w, VehicleType vehicle_type, int selected, int button)
Display the dropdown for the vehicle sort criteria.
bool _engine_sort_direction
false = descending, true = ascending.
uint16 EngineID
Unique identification number of an engine.
byte _engine_sort_last_criteria[]
Last set sort criteria, for each vehicle type.
Types related to vehicles.
bool _engine_sort_show_hidden_engines[]
Last set 'show hidden engines' setting for each vehicle type.
void DrawRoadVehEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type)
Draw a road vehicle engine.
int CDECL EngList_SortTypeFunction(const EngineID *, const EngineID *)
argument type for EngList_Sort.
Types related to the graphics and/or input devices.