From 63749d2d9d5f11c71aa35790599198aa055fec10 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Fri, 7 Feb 2014 22:17:24 -0600 Subject: [PATCH] Scroll after updating tier so isScrolling() returns accurately. --- src/components/IList.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/IList.h b/src/components/IList.h index 469f7f06d..b538a469d 100644 --- a/src/components/IList.h +++ b/src/components/IList.h @@ -160,10 +160,11 @@ protected: mScrollCursorAccumulator += deltaTime; mScrollTierAccumulator += deltaTime; + int scrollCount = 0; while(mScrollCursorAccumulator >= SCROLL_SPEED[mScrollTier].scrollDelay) { mScrollCursorAccumulator -= SCROLL_SPEED[mScrollTier].scrollDelay; - scroll(mScrollVelocity); + scrollCount++; } // are we ready to go even FASTER? @@ -172,6 +173,9 @@ protected: mScrollTierAccumulator -= SCROLL_SPEED[mScrollTier].length; mScrollTier++; } + + for(int i = 0; i < scrollCount; i++) + scroll(mScrollVelocity); } void scroll(int amt)