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

Method setScrolling

src/Interface/TextList.cpp:857–867  ·  view source on GitHub ↗

* Changes whether the list can be scrolled. * @param scrolling True to allow scrolling, false otherwise. * @param scrollPos Custom X position for the scroll buttons. */

Source from the content-addressed store, hash-verified

855 * @param scrollPos Custom X position for the scroll buttons.
856 */
857void TextList::setScrolling(bool scrolling, int scrollPos)
858{
859 _scrolling = scrolling;
860 if (scrollPos != _scrollPos)
861 {
862 _scrollPos = scrollPos;
863 _up->setX(getX() + getWidth() + _scrollPos);
864 _down->setX(getX() + getWidth() + _scrollPos);
865 _scrollbar->setX(getX() + getWidth() + _scrollPos);
866 }
867}
868
869/**
870 * Draws the text list and all the text contained within.

Callers 2

lstSavesPressMethod · 0.80
ComboBoxMethod · 0.80

Calls 1

setXMethod · 0.45

Tested by

no test coverage detected