OpenTTD Source 20261123-master-g1c55c72fd0
station_gui.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef STATION_GUI_H
11#define STATION_GUI_H
12
14#include "tilearea_orthogonal.h"
15#include "window_type.h"
16#include "station_type.h"
17
18
25
26int DrawStationCoverageAreaText(const Rect &r, StationCoverageType sct, int rad, bool supplies);
28void CheckRedrawRailWaypointCoverage(const Window *w);
29void CheckRedrawRoadWaypointCoverage(const Window *w);
30
31using StationPickerCmdProc = std::function<bool(bool test, StationID to_join)>;
32
33void ShowSelectStationIfNeeded(TileArea ta, StationPickerCmdProc proc);
34void ShowSelectRailWaypointIfNeeded(TileArea ta, StationPickerCmdProc proc);
35void ShowSelectRoadWaypointIfNeeded(TileArea ta, StationPickerCmdProc proc);
36
37#endif /* STATION_GUI_H */
All geometry types in OpenTTD.
#define Rect
Macro that prevents name conflicts between included headers.
void ShowSelectStationIfNeeded(TileArea ta, StationPickerCmdProc proc)
Show the station selection window when needed.
StationCoverageType
Types of cargo to display for station coverage.
Definition station_gui.h:20
@ SCT_NON_PASSENGERS_ONLY
Draw all non-passenger class cargoes.
Definition station_gui.h:22
@ SCT_PASSENGERS_ONLY
Draw only passenger class cargoes.
Definition station_gui.h:21
@ SCT_ALL
Draw all cargoes.
Definition station_gui.h:23
void ShowSelectRailWaypointIfNeeded(TileArea ta, StationPickerCmdProc proc)
Show the rail waypoint selection window when needed.
int DrawStationCoverageAreaText(const Rect &r, StationCoverageType sct, int rad, bool supplies)
Calculates and draws the accepted or supplied cargo around the selected tile(s).
void CheckRedrawStationCoverage(const Window *w)
Check whether we need to redraw the station coverage text.
void ShowSelectRoadWaypointIfNeeded(TileArea ta, StationPickerCmdProc proc)
Show the road waypoint selection window when needed.
Types related to stations.
Data structure for an opened window.
Definition window_gui.h:272
Type for storing and iterating orthogonal tile areas.
OrthogonalTileArea TileArea
Shorthand for the much more common orthogonal tile area.
Types related to windows.