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

Function windowFrameStyleDropdown

src/OpenLoco/src/Ui/Windows/Options.cpp:837–853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835 }
836
837 static void windowFrameStyleDropdown(int16_t selectedItem)
838 {
839 if (selectedItem == -1)
840 {
841 return;
842 }
843
844 if (selectedItem == enumValue(Config::get().windowFrameStyle))
845 {
846 return;
847 }
848
849 auto& cfg = OpenLoco::Config::get();
850 cfg.windowFrameStyle = OpenLoco::Config::WindowFrameStyle(selectedItem);
851 OpenLoco::Config::write();
852 Gfx::invalidateScreen();
853 }
854
855 // 0x004BFBB7
856 static void onMouseDown(Window& self, WidgetIndex_t wi, [[maybe_unused]] const WidgetId id)

Callers 1

onDropdownFunction · 0.85

Calls 5

enumValueFunction · 0.85
WindowFrameStyleEnum · 0.85
writeFunction · 0.85
invalidateScreenFunction · 0.85
getFunction · 0.50

Tested by

no test coverage detected