4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file station_gui.h Contains enums and function declarations connected with stations GUI */
15 #include "command_type.h"
16 #include "map/tilearea.h"
17 #include "window_type.h"
20 /** Types of cargo to display for station coverage. */
21 enum StationCoverageType
{
22 SCT_PASSENGERS_ONLY
, ///< Draw only passenger class cargoes.
23 SCT_NON_PASSENGERS_ONLY
, ///< Draw all non-passenger class cargoes.
24 SCT_ALL
, ///< Draw all cargoes.
27 int DrawStationCoverageAreaText (BlitArea
*dpi
, int left
, int right
, int top
, int rad
, StationCoverageType sct
= SCT_ALL
);
28 void CheckRedrawStationCoverage(const Window
*w
);
30 void ShowSelectBaseStationIfNeeded (Command
*cmd
, const TileArea
&ta
, bool waypoint
);
33 * Show the station selection window when needed. If not, build the station.
34 * @param cmd Command to build the station.
35 * @param ta Area to build the station in
37 static inline void ShowSelectStationIfNeeded (Command
*cmd
, const TileArea
&ta
)
39 ShowSelectBaseStationIfNeeded (cmd
, ta
, false);
43 * Show the waypoint selection window when needed. If not, build the waypoint.
44 * @param cmd Command to build the waypoint.
45 * @param ta Area to build the waypoint in
47 static inline void ShowSelectWaypointIfNeeded (Command
*cmd
, const TileArea
&ta
)
49 ShowSelectBaseStationIfNeeded (cmd
, ta
, true);
52 #endif /* STATION_GUI_H */