Merge pull request #115 from frto027/master

Fixed the rendering width of text that containing inline icons
This commit is contained in:
wofsauge authored and GitHub committed 2021-06-07 00:26:21 +02:00
commit 9dc4d479a9
1 file changed
+1 -1
+1 -1
View File
@@ -715,7 +715,7 @@ function EID:renderString(str, position, scale, kcolor)
local strFiltered, spriteTable = EID:filterIconMarkup(textPart[1], position.X, position.Y)
EID:renderInlineIcons(spriteTable, position.X + offsetX, position.Y)
EID.font:DrawStringScaledUTF8(strFiltered, position.X + offsetX, position.Y, scale.X, scale.Y, textPart[2], 0, false)
offsetX = offsetX + textPart[3]
offsetX = offsetX + EID:getStrWidth(strFiltered)
end
return textPartsTable[#textPartsTable][2]
end