Fixed the rendering width of text that containing inline icons

This commit is contained in:
frto027 committed 2021-06-06 11:37:06 +08:00
1 parent 89893399b7
commit 5be3b8260c
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