MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / UpdateWidgetItems

Function UpdateWidgetItems

src/openrct2-ui/scripting/CustomWindow.cpp:1202–1214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1200 }
1201
1202 void UpdateWidgetItems(WindowBase* w, WidgetIndex widgetIndex, const std::vector<std::string>& items)
1203 {
1204 if (w->classification == WindowClass::custom)
1205 {
1206 auto& customInfo = GetInfo(static_cast<CustomWindow*>(w));
1207 auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex);
1208 if (customWidgetInfo != nullptr)
1209 {
1210 customWidgetInfo->Items = items;
1211 UpdateWidgetSelectedIndex(w, widgetIndex, customWidgetInfo->SelectedIndex);
1212 }
1213 }
1214 }
1215
1216 void UpdateWidgetColour(WindowBase* w, WidgetIndex widgetIndex, Colour colour)
1217 {

Callers 1

items_setMethod · 0.85

Calls 2

GetCustomWidgetDescMethod · 0.80

Tested by

no test coverage detected