Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions es-core/src/components/ImageGridComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class ImageGridComponent : public IList<ImageGridData, T>
bool mLastRowPartial;
Vector2f mAutoLayout;
float mAutoLayoutZoom;
int mLastScrollTier;

Vector4f mPadding;
Vector2f mMargin;
Expand Down Expand Up @@ -119,6 +120,7 @@ ImageGridComponent<T>::ImageGridComponent(Window* window) : IList<ImageGridData,
mAutoLayout = Vector2f::Zero();
mAutoLayoutZoom = 1.0;

mLastScrollTier = 0;
mStartPosition = 0;

mEntriesDirty = true;
Expand Down Expand Up @@ -576,19 +578,24 @@ void ImageGridComponent<T>::updateTiles(bool ascending, bool allowAnimation, boo
if (!mTiles.size())
return;

// Stop updating the tiles at highest scroll speed
if (mScrollTier == 3)
{
for (int ti = 0; ti < (int)mTiles.size(); ti++)
// Stop updating the tiles at highest scroll speed
if (mLastScrollTier != 3)
{
std::shared_ptr<GridTileComponent> tile = mTiles.at(ti);
for (int ti = 0; ti < (int) mTiles.size(); ti++)
{
std::shared_ptr<GridTileComponent> tile = mTiles.at(ti);

tile->setSelected(false);
tile->setImage(mDefaultGameTexture);
tile->setVisible(false);
tile->setSelected(false);
tile->setImage(mDefaultGameTexture);
tile->setVisible(false);
}
}
mLastScrollTier = mScrollTier;
return;
}
mLastScrollTier = mScrollTier;

// Temporary store previous texture so they can't be unloaded
std::vector<std::shared_ptr<TextureResource>> previousTextures;
Expand Down