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

Function screenModeMouseDown

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

Source from the content-addressed store, hash-verified

331#endif
332
333 static void screenModeMouseDown(const Window& self, [[maybe_unused]] WidgetIndex_t wi)
334 {
335 auto& dropdown = self.widgets[Widx::screen_mode];
336 Dropdown::show(self.x + dropdown.left, self.y + dropdown.top, dropdown.width() - 4, dropdown.height(), self.getColour(WindowColour::secondary), 3, 0x80);
337
338 Dropdown::add(0, StringIds::dropdown_stringid, StringIds::options_mode_windowed);
339 Dropdown::add(1, StringIds::dropdown_stringid, StringIds::options_mode_fullscreen);
340 Dropdown::add(2, StringIds::dropdown_stringid, StringIds::options_mode_fullscreen_window);
341
342 auto selection = static_cast<uint16_t>(Config::get().display.mode);
343 Dropdown::setItemSelected(selection);
344 }
345
346 static void screenModeDropdown([[maybe_unused]] const Window& self, int16_t selection)
347 {

Callers 1

onMouseDownFunction · 0.85

Calls 7

showFunction · 0.85
setItemSelectedFunction · 0.85
getColourMethod · 0.80
addFunction · 0.50
getFunction · 0.50
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected