#include "command_type.h"
#include "station_type.h"
Go to the source code of this file.
Enumerations | |
| enum | StationViewWidgets { SVW_CAPTION = 0, SVW_WAITING = 1, SVW_SCROLLBAR = 2, SVW_ACCEPTLIST = 3, SVW_RATINGLIST = 3, SVW_LOCATION = 4, SVW_RATINGS = 5, SVW_ACCEPTS = 5, SVW_RENAME = 6, SVW_TRAINS = 7, SVW_ROADVEHS, SVW_PLANES, SVW_SHIPS } |
| Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets. More... | |
| enum | StationCoverageType { SCT_PASSENGERS_ONLY, SCT_NON_PASSENGERS_ONLY, SCT_ALL } |
| Types of cargo to display for station coverage. More... | |
Functions | |
| int | DrawCargoListText (uint32 cargo_mask, const Rect &r, StringID prefix) |
| Draw a (multi)line of cargos seperated by commas, and prefixed with a string. | |
| 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) |
| 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. | |
Definition in file station_gui.h.
| enum StationCoverageType |
Types of cargo to display for station coverage.
| SCT_PASSENGERS_ONLY | Draw only passenger class cargos. |
| SCT_NON_PASSENGERS_ONLY | Draw all non-passenger class cargos. |
| SCT_ALL | Draw all cargos. |
Definition at line 36 of file station_gui.h.
| enum StationViewWidgets |
Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets.
| SVW_CAPTION | Caption of the window. |
| SVW_WAITING | List of waiting cargo. |
| SVW_SCROLLBAR | Scrollbar. |
| SVW_ACCEPTLIST | List of accepted cargos. |
| SVW_RATINGLIST | Ratings of cargos. |
| SVW_LOCATION | 'Location' button |
| SVW_RATINGS | 'Ratings' button |
| SVW_ACCEPTS | 'Accepts' button |
| SVW_RENAME | 'Rename' button |
| SVW_TRAINS | List of scheduled trains button. |
| SVW_ROADVEHS | List of scheduled road vehs button. |
| SVW_PLANES | List of scheduled planes button. |
| SVW_SHIPS | List of scheduled ships button. |
Definition at line 19 of file station_gui.h.
Draw a (multi)line of cargos seperated by commas, and prefixed with a string.
| cargo_mask | Mask of cargos to include in the list. | |
| r | Rectangle to draw the cargos in. | |
| prefix | String to use as prefix for the list of cargos. |
Definition at line 876 of file misc_gui.cpp.
References Rect::bottom, DrawStringMultiLine(), endof, CargoSpec::Get(), HasBit(), lastof, Rect::left, Rect::right, SetDParamStr(), and Rect::top.
Referenced by StationViewWindow::DrawAcceptedCargo(), and DrawStationCoverageAreaText().
| 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 cargos should be drawn, else accepted cargos |
Definition at line 918 of file misc_gui.cpp.
References CC_PASSENGERS, DrawCargoListText(), GetAcceptanceAroundTiles(), GetProductionAroundTiles(), IsCargoInClass(), MapSize(), SCT_ALL, SCT_NON_PASSENGERS_ONLY, SCT_PASSENGERS_ONLY, SetBit(), and TILE_SIZE.
| 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 1445 of file station_gui.cpp.
| 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 1455 of file station_gui.cpp.
Referenced by BuildRailToolbarWindow::OnPlaceMouseUp().
1.5.6