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

Function heightsLabelsMouseDown

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

0x004C0FFA

Source from the content-addressed store, hash-verified

1711
1712 // 0x004C0FFA
1713 static void heightsLabelsMouseDown(const Window& self)
1714 {
1715 auto& dropdown = self.widgets[Widx::heights];
1716 Dropdown::show(self.x + dropdown.left, self.y + dropdown.top, dropdown.width() - 4, dropdown.height(), self.getColour(WindowColour::secondary), 2, 0x80);
1717
1718 Dropdown::add(0, StringIds::dropdown_stringid, StringIds::height_units);
1719 Dropdown::add(1, StringIds::dropdown_stringid, StringIds::height_real_values);
1720
1721 int selectedItem = 0;
1722 if (!Config::get().showHeightAsUnits)
1723 {
1724 selectedItem = 1;
1725 }
1726 Dropdown::setItemSelected(selectedItem);
1727 }
1728
1729 // 0x004C106C
1730 static void heightsLabelsDropdown([[maybe_unused]] const Window& self, int16_t index)

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