Fixed a small rounding error in TextComponent.

This commit is contained in:
Leon Styhre 2022-09-10 20:05:58 +02:00
parent ee2e9463a2
commit a2eedde8d3

View file

@ -194,7 +194,7 @@ void TextComponent::render(const glm::mat4& parentTrans)
}
else {
// If height is smaller than the font height, then always center vertically.
yOff = (getSize().y - textSize.y) / 2.0f;
yOff = std::round((getSize().y - textSize.y) / 2.0f);
}
// Draw the overall textbox area. If we're inside a scrollable container then this