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

Function InitWindowSystem

src/window.cpp:1859–1876  ·  view source on GitHub ↗

* (re)initialize the windowing system */

Source from the content-addressed store, hash-verified

1857 * (re)initialize the windowing system
1858 */
1859void InitWindowSystem()
1860{
1861 IConsoleClose();
1862
1863 _focused_window = nullptr;
1864 _mouseover_last_w = nullptr;
1865 _last_scroll_window = nullptr;
1866 _scrolling_viewport = false;
1867 _mouse_hovering = false;
1868
1869 SetupWidgetDimensions();
1870 NWidgetLeaf::InvalidateDimensionCache(); // Reset cached sizes of several widgets.
1871 NWidgetScrollbar::InvalidateDimensionCache();
1872
1873 InitDepotWindowBlockSizes();
1874
1875 ShowFirstError();
1876}
1877
1878/**
1879 * Close down the windowing system

Callers 2

openttd_mainFunction · 0.85
ResetWindowSystemFunction · 0.85

Calls 4

IConsoleCloseFunction · 0.85
SetupWidgetDimensionsFunction · 0.85
ShowFirstErrorFunction · 0.85

Tested by

no test coverage detected