MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / open

Function open

src/OpenLoco/src/Ui/Windows/TitleMenu.cpp:144–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 static const WindowEventList& getEvents();
143
144 Window* open()
145 {
146 auto window = OpenLoco::Ui::WindowManager::createWindow(
147 WindowType::titleMenu,
148 { (Ui::width() - kWW) / 2, Ui::height() - kWH - 25 },
149 { kWW, kWH },
150 WindowFlags::stickToFront | WindowFlags::transparent | WindowFlags::noBackground | WindowFlags::framedWidgets,
151 getEvents());
152
153 window->setWidgets(_widgets);
154 window->initScrollWidgets();
155
156 window->setColour(WindowColour::primary, AdvancedColour(Colour::mutedSeaGreen).translucent());
157 window->setColour(WindowColour::secondary, AdvancedColour(Colour::mutedSeaGreen).translucent());
158 window->var_846 = 0;
159
160 return window;
161 }
162
163 // 0x00438E0B
164 static void prepareDraw(Ui::Window& window)

Callers 1

sub_4391DAFunction · 0.70

Calls 8

widthFunction · 0.85
heightFunction · 0.85
setWidgetsMethod · 0.80
initScrollWidgetsMethod · 0.80
translucentMethod · 0.80
createWindowFunction · 0.50
AdvancedColourClass · 0.50
setColourMethod · 0.45

Tested by

no test coverage detected