MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / scroll

Method scroll

src/components/TextListComponent.h:294–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292
293template <typename T>
294void TextListComponent<T>::scroll()
295{
296 mSelection += mScrollDir;
297
298 if(mSelection < 0)
299 {
300 if(mScrollDir < -1)
301 mSelection = 0;
302 else
303 mSelection += mRowVector.size();
304 }
305 if(mSelection >= (int)mRowVector.size())
306 {
307 if(mScrollDir > 1)
308 mSelection = (int)mRowVector.size() - 1;
309 else
310 mSelection -= mRowVector.size();
311 }
312
313 if(mScrollSound)
314 mScrollSound->play();
315}
316
317//list management stuff
318template <typename T>

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
playMethod · 0.45

Tested by

no test coverage detected