From c20ac31fea22af9e9c762e08ea77b1fdf429b969 Mon Sep 17 00:00:00 2001 From: emb <> Date: Wed, 5 Aug 2015 10:44:27 -0500 Subject: [PATCH] Scrolling now works. ReloadableImages are not always updating properly from component states. --- RetroFE/Source/Graphics/Component/ScrollingList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RetroFE/Source/Graphics/Component/ScrollingList.cpp b/RetroFE/Source/Graphics/Component/ScrollingList.cpp index 7e44526..99dbf3e 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingList.cpp +++ b/RetroFE/Source/Graphics/Component/ScrollingList.cpp @@ -36,7 +36,7 @@ #include #include #include - +#include //todo: remove coupling from configuration data (if possible) ScrollingList::ScrollingList(Configuration &c, @@ -246,10 +246,10 @@ void ScrollingList::click(double nextScrollTime) } else if(currentScrollDirection_ == ScrollDirectionForward) { + unsigned int itemIncrement = loopIncrement(itemIndex_, scrollPoints_->size(), items_->size()); itemIndex_ = loopIncrement(itemIndex_, 1, items_->size()); - Item *i = items_->at(itemIndex_); + Item *i = items_->at(itemIncrement); - deallocateTexture(componentIndex_); allocateTexture(componentIndex_, i);