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

Function WindowGetScrollDataIndex

src/openrct2/interface/Window.cpp:233–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 }
232
233 int32_t WindowGetScrollDataIndex(const WindowBase& w, WidgetIndex widget_index)
234 {
235 int32_t result = 0;
236 for (int32_t i = 0; i < widget_index; i++)
237 {
238 const auto& widget = w.widgets[i];
239 if (widget.type == WidgetType::scroll)
240 result++;
241 }
242 return result;
243 }
244
245 /**
246 *

Callers 4

WidgetScrollDrawFunction · 0.85
widgetScrollUpdateThumbsFunction · 0.85
GetCustomListViewFunction · 0.85
InputScrollDragBeginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected