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

Function open

src/OpenLoco/src/Ui/Windows/Cheats.cpp:889–915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887 }
888
889 Window* open()
890 {
891 auto window = WindowManager::bringToFront(WindowType::cheats);
892 if (window != nullptr)
893 {
894 return window;
895 }
896
897 window = WindowManager::createWindow(
898 WindowType::cheats,
899 Finances::kWindowSize,
900 WindowFlags::none,
901 Finances::getEvents());
902
903 Finances::initDate();
904
905 window->setWidgets(Finances::_widgets);
906 window->currentTab = Common::Widx::tab_finances - Common::Widx::tab_finances;
907 window->holdableWidgets = Finances::holdableWidgets;
908 window->initScrollWidgets();
909
910 auto skin = ObjectManager::get<InterfaceSkinObject>();
911 window->setColour(WindowColour::primary, skin->windowTitlebarColour);
912 window->setColour(WindowColour::secondary, skin->windowColour);
913
914 return window;
915 }
916
917 namespace Common
918 {

Callers

nothing calls this directly

Calls 6

bringToFrontFunction · 0.85
initDateFunction · 0.85
setWidgetsMethod · 0.80
initScrollWidgetsMethod · 0.80
createWindowFunction · 0.50
setColourMethod · 0.45

Tested by

no test coverage detected