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

Method SetScrollbars

src/openrct2-ui/scripting/CustomListView.cpp:217–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void CustomListView::SetScrollbars(ScrollbarType value, bool initialising)
218{
219 Scrollbars = value;
220
221 if (!initialising)
222 {
223 auto widget = GetWidget();
224 if (widget != nullptr)
225 {
226 if (value == ScrollbarType::Horizontal)
227 widget->content = SCROLL_HORIZONTAL;
228 else if (value == ScrollbarType::Vertical)
229 widget->content = SCROLL_VERTICAL;
230 else if (value == ScrollbarType::Both)
231 widget->content = SCROLL_BOTH;
232 else
233 widget->content = 0;
234 }
235 WindowInitScrollWidgets(*ParentWindow);
236 Invalidate();
237 }
238}
239
240const std::vector<ListViewColumn>& CustomListView::GetColumns() const
241{

Callers 2

RefreshWidgetsMethod · 0.80
scrollbars_setMethod · 0.80

Calls 2

WindowInitScrollWidgetsFunction · 0.85
InvalidateFunction · 0.50

Tested by

no test coverage detected