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

Function ShowExtraViewportWindow

src/viewport_gui.cpp:159–167  ·  view source on GitHub ↗

* Show a new Extra Viewport window. * @param tile Tile to center the view on. INVALID_TILE means to use the center of main viewport. */

Source from the content-addressed store, hash-verified

157 * @param tile Tile to center the view on. INVALID_TILE means to use the center of main viewport.
158 */
159void ShowExtraViewportWindow(TileIndex tile)
160{
161 int i = 0;
162
163 /* find next free window number for extra viewport */
164 while (FindWindowById(WC_EXTRA_VIEWPORT, i) != nullptr) i++;
165
166 new ExtraViewportWindow(_extra_viewport_desc, i, tile);
167}
168
169/**
170 * Show a new Extra Viewport window.

Callers 15

HandleClickMethod · 0.85
OnClickMethod · 0.85
HandleClickMethod · 0.85
MenuClickMapFunction · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85

Calls 1

FindWindowByIdFunction · 0.85

Tested by

no test coverage detected