Codechange: Use lambdas instead of CommandContainer to manage station picker commands.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user