|
OpenTTD Source 20260711-master-g3fb3006dff
|
A viewport command for the main menu background (intro game). More...
Public Member Functions | |
| Point | PositionForViewport (const Viewport &vp) |
| Calculate effective position. | |
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 = VehicleID::Invalid() |
| Vehicle to follow, or VehicleID::Invalid() 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. | |
| Alignment | align = {AlignmentH::Centre, AlignmentV::Middle} |
| Alignment. | |
A viewport command for the main menu background (intro game).
Definition at line 49 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 64 of file intro_gui.cpp.
References Bottom, Centre, ForceLeft, ForceRight, Middle, Point, RemapCoords(), Alignment::ResolveRTL(), Top, Alignment::v, Viewport::virtual_height, Viewport::virtual_width, Coord2D< T >::x, Vehicle::x_pos, Coord2D< T >::y, Vehicle::y_pos, and Vehicle::z_pos.
Referenced by SelectGameWindow::OnRealtimeTick().
| Alignment IntroGameViewportCommand::align = {AlignmentH::Centre, AlignmentV::Middle} |
Definition at line 56 of file intro_gui.cpp.
Referenced by SelectGameWindow::ReadIntroGameViewportCommand().
| int IntroGameViewportCommand::command_index = 0 |
Sequence number of the command (order they are performed in).
Definition at line 50 of file intro_gui.cpp.
Referenced by SelectGameWindow::ReadIntroGameViewportCommand().
| uint IntroGameViewportCommand::delay = 0 |
Delay until next command.
Definition at line 53 of file intro_gui.cpp.
Referenced by SelectGameWindow::OnRealtimeTick(), and SelectGameWindow::ReadIntroGameViewportCommand().
| bool IntroGameViewportCommand::pan_to_next = false |
If true, do a smooth pan from this position to the next.
Definition at line 55 of file intro_gui.cpp.
Referenced by SelectGameWindow::OnRealtimeTick(), and SelectGameWindow::ReadIntroGameViewportCommand().
| Point IntroGameViewportCommand::position { 0, 0 } |
Calculated world coordinate to position viewport top-left at.
Definition at line 51 of file intro_gui.cpp.
Referenced by SelectGameWindow::ReadIntroGameViewportCommand().
| VehicleID IntroGameViewportCommand::vehicle = VehicleID::Invalid() |
Vehicle to follow, or VehicleID::Invalid() if not following a vehicle.
Definition at line 52 of file intro_gui.cpp.
Referenced by SelectGameWindow::OnRealtimeTick(), and SelectGameWindow::ReadIntroGameViewportCommand().
| int IntroGameViewportCommand::zoom_adjust = 0 |
Adjustment to zoom level from base zoom level.
Definition at line 54 of file intro_gui.cpp.
Referenced by SelectGameWindow::OnRealtimeTick(), and SelectGameWindow::ReadIntroGameViewportCommand().