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:
Peter Nelson
2023-12-02 23:28:01 +00:00
committed by Peter Nelson
parent 4d9f335f36
commit dcf730f1f6
13 changed files with 67 additions and 43 deletions

View File

@@ -903,7 +903,7 @@ private:
Scrollbar *vscroll; ///< Vertical scrollbar of the new station list.
Scrollbar *vscroll2; ///< Vertical scrollbar of the matrix with new stations.
typedef GUIList<StationClassID, StringFilter &> GUIStationClassList; ///< Type definition for the list to hold available station classes.
typedef GUIList<StationClassID, std::nullptr_t, StringFilter &> GUIStationClassList; ///< Type definition for the list to hold available station classes.
static const uint EDITBOX_MAX_SIZE = 16; ///< The maximum number of characters for the filter edit box.