Fixed an issue where line breaks were included in single-line text entries.

This commit is contained in:
Leon Styhre 2022-10-08 10:00:40 +02:00
parent 508ea87963
commit d927135034

View file

@ -313,6 +313,10 @@ std::string Font::wrapText(const std::string& text,
for (size_t i = 0; i < text.length(); ++i) {
if (text[i] == '\n') {
if (!multiLine) {
addDots = true;
break;
}
wrappedText.append("\n");
accumHeight += lineHeight;
lineWidth = 0.0f;