Eliminated some incorrect and unnecessary cursor stops in IList.

Also got rid of some unnecessary cursor stops triggered by TextListComponent.
This commit is contained in:
Leon Styhre 2022-08-19 17:17:34 +02:00
parent 7718e97d29
commit 15314fff84
2 changed files with 4 additions and 1 deletions

View file

@ -101,6 +101,9 @@ public:
void stopScrolling()
{
if (mScrollVelocity == 0)
return;
mTitleOverlayOpacity = 0.0f;
listInput(0);

View file

@ -282,7 +282,7 @@ template <typename T> void TextListComponent<T>::update(int deltaTime)
{
List::listUpdate(deltaTime);
if (mWindow->isScreensaverActive() || !mWindow->getAllowTextScrolling())
if (isScrolling() && (mWindow->isScreensaverActive() || !mWindow->getAllowTextScrolling()))
List::stopScrolling();
if (!isScrolling() && size() > 0) {