MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / scrollTo

Method scrollTo

src/Interface/TextList.cpp:1130–1137  ·  view source on GitHub ↗

* set the scroll depth. * @param scroll set the scroll depth to this. */

Source from the content-addressed store, hash-verified

1128 * @param scroll set the scroll depth to this.
1129 */
1130void TextList::scrollTo(size_t scroll)
1131{
1132 if (!_scrolling)
1133 return;
1134 _scroll = std::max((size_t)(0), std::min(_rows.size() - _visibleRows, scroll));
1135 draw(); // can't just set _redraw here because reasons
1136 updateArrows();
1137}
1138
1139/**
1140 * Hooks up the button to work as part of an existing combobox,

Callers 3

initMethod · 0.80
handleMethod · 0.80
toggleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected