Fixed an issue where ScrollableContainer would reset too early.

This commit is contained in:
Leon Styhre 2022-10-16 15:00:38 +02:00
parent 2f5bc97d4c
commit 0f327582c1

View file

@ -188,8 +188,8 @@ void ScrollableContainer::update(int deltaTime)
if (mScrollPos.y < 0.0f)
mScrollPos.y = 0.0f;
if (mScrollPos.x + mSize.x > contentSize.x) {
mScrollPos.x = contentSize.x - mSize.x;
if (mScrollPos.x + std::round(mSize.x) > contentSize.x) {
mScrollPos.x = contentSize.x - std::round(mSize.x);
mAtEnd = true;
}