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

Function townsMenuDropdown

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

0x0043A932

Source from the content-addressed store, hash-verified

468
469 // 0x0043A932
470 void townsMenuDropdown([[maybe_unused]] Window* window, [[maybe_unused]] WidgetIndex_t widgetIndex, int16_t itemIndex)
471 {
472 if (itemIndex == -1)
473 {
474 itemIndex = Dropdown::getHighlightedItem();
475 }
476
477 if (itemIndex == 0)
478 {
479 TownList::open();
480 _lastTownOption = 0;
481 }
482 else if (itemIndex == 1)
483 {
484 IndustryList::open();
485 _lastTownOption = 1;
486 }
487 }
488
489 void onDropdown(Window* window, WidgetIndex_t widgetIndex, int16_t itemIndex)
490 {

Callers 1

onDropdownFunction · 0.85

Calls 2

getHighlightedItemFunction · 0.85
openFunction · 0.70

Tested by

no test coverage detected