Merge pull request #111 from frto027/master

add offsetX when render inline icons
This commit is contained in:
wofsauge authored and GitHub committed 2021-05-30 14:14:23 +02:00
commit eff4a175a4
1 file changed
+1 -1
+1 -1
View File
@@ -688,7 +688,7 @@ function EID:renderString(str, position, scale, kcolor)
local offsetX = 0
for i, textPart in ipairs(textPartsTable) do
local strFiltered, spriteTable = EID:filterIconMarkup(textPart[1], position.X, position.Y)
EID:renderInlineIcons(spriteTable, 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]
end