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

Function GetCustomListView

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

Source from the content-addressed store, hash-verified

1419 }
1420
1421 CustomListView* GetCustomListView(WindowBase* w, WidgetIndex widgetIndex)
1422 {
1423 if (w->classification == WindowClass::custom)
1424 {
1425 auto& info = GetInfo(static_cast<CustomWindow*>(w));
1426 auto scrollIndex = WindowGetScrollDataIndex(*w, widgetIndex);
1427 if (scrollIndex < static_cast<int32_t>(info.ListViews.size()))
1428 {
1429 return &info.ListViews[scrollIndex];
1430 }
1431 }
1432 return nullptr;
1433 }
1434
1435 int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex)
1436 {

Callers 1

GetListViewMethod · 0.85

Calls 2

WindowGetScrollDataIndexFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected