diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-29 00:56:07 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 996b16de707c449a83676c614edbd5a81d37b253 (patch) | |
tree | eb4298aef03768ca8483959db9799cd414f779af /src/station_gui.h | |
parent | a05fd7aa50ecbee425df2d6f9015ec3ea359232f (diff) | |
download | openttd-996b16de707c449a83676c614edbd5a81d37b253.tar.xz |
Codechange: Use lambdas instead of CommandContainer to manage station picker commands.
Diffstat (limited to 'src/station_gui.h')
-rw-r--r-- | src/station_gui.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/station_gui.h b/src/station_gui.h index ac2fa2fc3..9bed30b67 100644 --- a/src/station_gui.h +++ b/src/station_gui.h @@ -13,6 +13,8 @@ #include "command_type.h" #include "tilearea_type.h" #include "window_type.h" +#include "station_type.h" +#include <functional> /** Types of cargo to display for station coverage. */ @@ -25,7 +27,9 @@ enum StationCoverageType { int DrawStationCoverageAreaText(int left, int right, int top, StationCoverageType sct, int rad, bool supplies); void CheckRedrawStationCoverage(const Window *w); -void ShowSelectStationIfNeeded(const CommandContainer &cmd, TileArea ta); -void ShowSelectWaypointIfNeeded(const CommandContainer &cmd, TileArea ta); +using StationPickerCmdProc = std::function<bool(bool test, StationID to_join)>; + +void ShowSelectStationIfNeeded(TileArea ta, StationPickerCmdProc proc); +void ShowSelectWaypointIfNeeded(TileArea ta, StationPickerCmdProc proc); #endif /* STATION_GUI_H */ |