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

Method scrollDown

src/Interface/TextList.cpp:801–823  ·  view source on GitHub ↗

* Scrolls the text in the list down by one row or to the bottom. * @param toMax If true then scrolls to the bottom of the list. false => one row down * @param scrollByWheel If true then use wheel scroll, otherwise scroll normally. */

Source from the content-addressed store, hash-verified

799 * @param scrollByWheel If true then use wheel scroll, otherwise scroll normally.
800 */
801void TextList::scrollDown(bool toMax, bool scrollByWheel)
802{
803 if (!_scrolling)
804 return;
805 if (_rows.size() > _visibleRows && _scroll < _rows.size() - _visibleRows)
806 {
807 if (toMax)
808 {
809 scrollTo(_rows.size() - _visibleRows);
810 }
811 else
812 {
813 if (scrollByWheel)
814 {
815 scrollTo(_scroll + Options::mousewheelSpeed);
816 }
817 else
818 {
819 scrollTo(_scroll + 1);
820 }
821 }
822 }
823}
824
825/**
826 * Updates the visibility of the arrow buttons according to

Callers 5

moveSoldierDownMethod · 0.80
mousePressMethod · 0.80
scrollMethod · 0.80
mousePressMethod · 0.80
mouseClickMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected