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

Function open

src/OpenLoco/src/Ui/Windows/KeyboardShortcuts.cpp:57–81  ·  view source on GitHub ↗

0x004BE6C7

Source from the content-addressed store, hash-verified

55
56 // 0x004BE6C7
57 Window* open()
58 {
59 Window* window;
60
61 window = WindowManager::bringToFront(WindowType::keyboardShortcuts, 0);
62 if (window != nullptr)
63 {
64 return window;
65 }
66
67 // 0x004BF833 (create_options_window)
68 window = WindowManager::createWindowCentred(WindowType::keyboardShortcuts, { 360, 238 }, WindowFlags::none, getEvents());
69
70 window->setWidgets(_widgets);
71 window->initScrollWidgets();
72
73 auto skin = ObjectManager::get<InterfaceSkinObject>();
74 window->setColour(WindowColour::primary, skin->windowTitlebarColour);
75 window->setColour(WindowColour::secondary, skin->windowOptionsColour);
76
77 window->rowCount = static_cast<uint16_t>(ShortcutManager::getList().size());
78 window->rowHover = -1;
79
80 return window;
81 }
82
83 // 0x004BE726
84 static void draw(Ui::Window& self, Gfx::DrawingContext& drawingCtx)

Callers 1

onScrollMouseDownFunction · 0.70

Calls 6

bringToFrontFunction · 0.85
createWindowCentredFunction · 0.85
setWidgetsMethod · 0.80
initScrollWidgetsMethod · 0.80
setColourMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected