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

Method MainToolbarWindow

src/toolbar_gui.cpp:1980–1990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1978/** Main toolbar. */
1979struct MainToolbarWindow : Window {
1980 MainToolbarWindow(WindowDesc &desc) : Window(desc)
1981 {
1982 this->InitNested(0);
1983
1984 _last_started_action = CBF_NONE;
1985 this->flags.Reset(WindowFlag::WhiteBorder);
1986 this->SetWidgetDisabledState(WID_TN_PAUSE, _networking && !_network_server); // if not server, disable pause button
1987 this->SetWidgetDisabledState(WID_TN_FAST_FORWARD, _networking); // if networking, disable fast-forward button
1988 PositionMainToolbar(this);
1989 DoZoomInOutWindow(ZOOM_NONE, this);
1990 }
1991
1992 void FindWindowPlacementAndResize(int, int def_height, bool allow_resize) override
1993 {

Callers

nothing calls this directly

Calls 5

PositionMainToolbarFunction · 0.85
DoZoomInOutWindowFunction · 0.85
InitNestedMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected