Codechange: Optionally allow passing state to GUIList sorter function.
GUIList sorter functions can currently only use global state, which makes per-window-instance sorting difficult.
This commit is contained in:

committed by
Peter Nelson

parent
4d9f335f36
commit
dcf730f1f6
@@ -28,7 +28,7 @@ struct GUIEngineListItem {
|
||||
bool operator == (const EngineID &other) const { return this->engine_id == other; }
|
||||
};
|
||||
|
||||
typedef GUIList<GUIEngineListItem, CargoID> GUIEngineList;
|
||||
typedef GUIList<GUIEngineListItem, std::nullptr_t, CargoID> GUIEngineList;
|
||||
|
||||
typedef bool EngList_SortTypeFunction(const GUIEngineListItem&, const GUIEngineListItem&); ///< argument type for #EngList_Sort.
|
||||
void EngList_Sort(GUIEngineList &el, EngList_SortTypeFunction compare);
|
||||
|
Reference in New Issue
Block a user