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

Method MainWindow

src/main_gui.cpp:215–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213struct MainWindow : Window
214{
215 MainWindow(WindowDesc &desc) : Window(desc)
216 {
217 this->InitNested(0);
218 this->flags.Reset(WindowFlag::WhiteBorder);
219 ResizeWindow(this, _screen.width, _screen.height);
220
221 NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_M_VIEWPORT);
222 nvp->InitializeViewport(this, TileXY(32, 32), ScaleZoomGUI(ZoomLevel::Viewport));
223
224 this->viewport->overlay = std::make_shared<LinkGraphOverlay>(this, WID_M_VIEWPORT, 0, CompanyMask{}, 2);
225 this->refresh_timeout.Reset();
226 }
227
228 /** Refresh the link-graph overlay. */
229 void RefreshLinkGraph()

Callers

nothing calls this directly

Calls 6

ResizeWindowFunction · 0.85
TileXYFunction · 0.85
ScaleZoomGUIFunction · 0.85
InitNestedMethod · 0.80
InitializeViewportMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected