|
OpenTTD Source
12.2
|
A viewport command for the main menu background (intro game). More...
Public Types | |
| enum | AlignmentH : byte { LEFT, CENTRE, RIGHT } |
| Horizontal alignment value. | |
| enum | AlignmentV : byte { TOP, MIDDLE, BOTTOM } |
| Vertical alignment value. | |
Public Member Functions | |
| Point | PositionForViewport (const Viewport *vp) |
| Calculate effective position. More... | |
Data Fields | |
| int | command_index = 0 |
| Sequence number of the command (order they are performed in). | |
| Point | position { 0, 0 } |
| Calculated world coordinate to position viewport top-left at. | |
| VehicleID | vehicle = INVALID_VEHICLE |
| Vehicle to follow, or INVALID_VEHICLE if not following a vehicle. | |
| uint | delay = 0 |
| Delay until next command. | |
| int | zoom_adjust = 0 |
| Adjustment to zoom level from base zoom level. | |
| bool | pan_to_next = false |
| If true, do a smooth pan from this position to the next. | |
| AlignmentH | align_h = CENTRE |
| Horizontal alignment. | |
| AlignmentV | align_v = MIDDLE |
| Vertical alignment. | |
A viewport command for the main menu background (intro game).
Definition at line 46 of file intro_gui.cpp.
Calculate effective position.
This will update the position field if a vehicle is followed.
| vp | Viewport to calculate position for. |
Definition at line 75 of file intro_gui.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::Get(), INVALID_VEHICLE, position, RemapCoords(), Viewport::virtual_height, Viewport::virtual_width, Vehicle::x_pos, Vehicle::y_pos, and Vehicle::z_pos.