Contains enums and function declarations connected with stations GUI. More...
#include "command_type.h"#include "tilearea_type.h"#include "window_type.h"Go to the source code of this file.
Enumerations | |
| enum | StationCoverageType { SCT_PASSENGERS_ONLY, SCT_NON_PASSENGERS_ONLY, SCT_ALL } |
Types of cargo to display for station coverage. More... | |
Functions | |
| int | DrawStationCoverageAreaText (int left, int right, int top, 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 | ShowSelectStationIfNeeded (CommandContainer cmd, TileArea ta) |
| Show the station selection window when needed. | |
| void | ShowSelectWaypointIfNeeded (CommandContainer cmd, TileArea ta) |
| Show the waypoint selection window when needed. | |
Contains enums and function declarations connected with stations GUI.
Definition in file station_gui.h.
| enum StationCoverageType |
Types of cargo to display for station coverage.
| SCT_PASSENGERS_ONLY |
Draw only passenger class cargoes. |
| SCT_NON_PASSENGERS_ONLY |
Draw all non-passenger class cargoes. |
| SCT_ALL |
Draw all cargoes. |
Definition at line 21 of file station_gui.h.
| void CheckRedrawStationCoverage | ( | const Window * | w | ) |
Check whether we need to redraw the station coverage text.
If it is needed actually make the window for redrawing.
| w | the window to check. |
Definition at line 79 of file station_gui.cpp.
References TileHighlightData::dirty, and Window::SetDirty().
Referenced by BuildRoadStationWindow::OnTick(), BuildRailStationWindow::OnTick(), BuildDocksStationWindow::OnTick(), and BuildAirportWindow::OnTick().
| int DrawStationCoverageAreaText | ( | int | left, | |
| int | right, | |||
| int | top, | |||
| StationCoverageType | sct, | |||
| int | rad, | |||
| bool | supplies | |||
| ) |
Calculates and draws the accepted or supplied cargo around the selected tile(s).
| left | x position where the string is to be drawn | |
| right | the right most position to draw on | |
| top | y position where the string is to be drawn | |
| sct | which type of cargo is to be displayed (passengers/non-passengers) | |
| rad | radius around selected tile(s) to be searched | |
| supplies | if supplied cargoes should be drawn, else accepted cargoes |
Definition at line 47 of file station_gui.cpp.
References CC_PASSENGERS, DrawStringMultiLine(), TileHighlightData::drawstyle, GetAcceptanceAroundTiles(), GetProductionAroundTiles(), HT_RECT, IsCargoInClass(), MapSize(), TileHighlightData::pos, SCT_ALL, SCT_NON_PASSENGERS_ONLY, SCT_PASSENGERS_ONLY, SetBit(), SetDParam(), TileHighlightData::size, TILE_SIZE, and TileVirtXY().
Referenced by BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), and BuildAirportWindow::OnPaint().
| void ShowSelectStationIfNeeded | ( | CommandContainer | cmd, | |
| TileArea | ta | |||
| ) |
Show the station selection window when needed.
If not, build the station.
| cmd | Command to build the station. | |
| ta | Area to build the station in |
Definition at line 1468 of file station_gui.cpp.
Referenced by BuildDocksToolbarWindow::OnPlaceObject(), PlaceAirport(), PlaceRail_Station(), and PlaceRoadStop().
| void ShowSelectWaypointIfNeeded | ( | CommandContainer | cmd, | |
| TileArea | ta | |||
| ) |
Show the waypoint selection window when needed.
If not, build the waypoint.
| cmd | Command to build the waypoint. | |
| ta | Area to build the waypoint in |
Definition at line 1478 of file station_gui.cpp.
Referenced by BuildRailToolbarWindow::OnPlaceMouseUp().
1.7.1