diff --git a/es-core/src/components/primary/TextListComponent.h b/es-core/src/components/primary/TextListComponent.h index 3bf27b1f0..a96e9c677 100644 --- a/es-core/src/components/primary/TextListComponent.h +++ b/es-core/src/components/primary/TextListComponent.h @@ -460,11 +460,14 @@ template void TextListComponent::render(const glm::mat4& parentT glm::mat4 drawTrans {trans}; // Currently selected item text might be looping. - if (mCursor == i && mLoopOffset > 0) + if (mCursor == i && mLoopOffset > 0) { drawTrans = glm::translate( - drawTrans, offset - glm::vec3 {static_cast(mLoopOffset), 0.0f, 0.0f}); - else - drawTrans = glm::translate(drawTrans, offset); + drawTrans, + glm::round(offset - glm::vec3 {static_cast(mLoopOffset), 0.0f, 0.0f})); + } + else { + drawTrans = glm::translate(drawTrans, glm::round(offset)); + } // Needed to avoid flickering when returning to the start position. if (mLoopOffset == 0 && mLoopOffset2 == 0) @@ -478,7 +481,8 @@ template void TextListComponent::render(const glm::mat4& parentT mLoopScroll = true; drawTrans = trans; drawTrans = glm::translate( - drawTrans, offset - glm::vec3 {static_cast(mLoopOffset2), 0.0f, 0.0f}); + drawTrans, + glm::round(offset - glm::vec3 {static_cast(mLoopOffset2), 0.0f, 0.0f})); mRenderer->setMatrix(drawTrans); font->renderTextCache(entry.data.textCache.get()); }