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

Function townsMenuMouseDown

src/OpenLoco/src/Ui/Windows/ToolbarTopCommon.cpp:292–299  ·  view source on GitHub ↗

0x0043A8CE

Source from the content-addressed store, hash-verified

290
291 // 0x0043A8CE
292 void townsMenuMouseDown(Window* window, WidgetIndex_t widgetIndex)
293 {
294 auto interface = ObjectManager::get<InterfaceSkinObject>();
295 Dropdown::add(0, StringIds::menu_sprite_stringid, { interface->img + InterfaceSkin::ImageIds::toolbar_menu_towns, StringIds::menu_towns });
296 Dropdown::add(1, StringIds::menu_sprite_stringid, { interface->img + InterfaceSkin::ImageIds::toolbar_menu_industries, StringIds::menu_industries });
297 Dropdown::showBelow(window, widgetIndex, 2, 25, (1 << 6));
298 Dropdown::setHighlightedItem(_lastTownOption);
299 }
300
301 // 0x0043A86D
302 void zoomMenuDropdown(Window* window, [[maybe_unused]] WidgetIndex_t widgetIndex, int16_t itemIndex)

Callers 1

onMouseDownFunction · 0.85

Calls 3

showBelowFunction · 0.85
setHighlightedItemFunction · 0.85
addFunction · 0.50

Tested by

no test coverage detected