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

Function onDropdown

src/OpenLoco/src/Ui/Windows/TerraForm.cpp:350–363  ·  view source on GitHub ↗

0x004BBAF5

Source from the content-addressed store, hash-verified

348
349 // 0x004BBAF5
350 static void onDropdown(Window& self, WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id, int16_t itemIndex)
351 {
352 if (widgetIndex != widx::object_colour)
353 {
354 return;
355 }
356 if (itemIndex == -1)
357 {
358 return;
359 }
360
361 _treeColour = static_cast<Colour>(Dropdown::getHighlightedItem());
362 self.invalidate();
363 }
364
365 // 0x004BBDA5
366 static void onUpdate(Window& self)

Callers

nothing calls this directly

Calls 3

getHighlightedItemFunction · 0.85
getItemArgumentFunction · 0.85
invalidateMethod · 0.45

Tested by

no test coverage detected