MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / InitializeViewport

Method InitializeViewport

src/widget.cpp:2421–2424  ·  view source on GitHub ↗

* Initialize the viewport of the window. * @param w Window owning the viewport. * @param focus Either the tile index or vehicle ID to focus. * @param zoom Zoom level. */

Source from the content-addressed store, hash-verified

2419 * @param zoom Zoom level.
2420 */
2421void NWidgetViewport::InitializeViewport(Window *w, std::variant<TileIndex, VehicleID> focus, ZoomLevel zoom)
2422{
2423 InitializeWindowViewport(w, this->pos_x, this->pos_y, this->current_x, this->current_y, focus, zoom);
2424}
2425
2426/**
2427 * Update the position and size of the viewport (after eg a resize).

Callers 7

ExtraViewportWindowMethod · 0.80
IndustryViewWindowMethod · 0.80
TownViewWindowMethod · 0.80
NewsWindowMethod · 0.80
WaypointWindowMethod · 0.80
VehicleViewWindowMethod · 0.80
MainWindowMethod · 0.80

Calls 1

InitializeWindowViewportFunction · 0.85

Tested by

no test coverage detected