mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 01:25:38 +00:00
Fixed an issue where horizontally scrolling text was not always rendered correctly when scrolling was reset
This commit is contained in:
parent
68ba299e0e
commit
847874a149
|
@ -378,9 +378,14 @@ void TextComponent::setHorizontalScrolling(bool state)
|
|||
resetComponent();
|
||||
mHorizontalScrolling = state;
|
||||
|
||||
if (mHorizontalScrolling)
|
||||
if (mHorizontalScrolling) {
|
||||
mScrollSpeed =
|
||||
mFont->sizeText("ABCDEFGHIJKLMNOPQRSTUVWXYZ").x * 0.247f * mScrollSpeedMultiplier;
|
||||
}
|
||||
else if (mTextCache != nullptr) {
|
||||
mTextCache->setClipRegion(
|
||||
glm::vec4 {0.0f, 0.0f, mSize.x * mRelativeScale, mTextCache->metrics.size.y});
|
||||
}
|
||||
}
|
||||
|
||||
void TextComponent::update(int deltaTime)
|
||||
|
|
Loading…
Reference in a new issue