From a121303ee187d8b260714d6ca5f24e0d208578a9 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Fri, 4 Jun 2021 21:21:42 +0200 Subject: [PATCH] Fixed rendering of bullet point icons being to close to the text in some cases --- eid_api.lua | 2 +- main.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index 91d3fb8e..9e6a262f 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -531,7 +531,7 @@ function EID:createItemIconObject(str) spriteDummy:Load("gfx/eid_inline_icons.anm2", true) spriteDummy:ReplaceSpritesheet(1, item.GfxFileName) spriteDummy:LoadGraphics() - return {"ItemIcon",0,11,7,-2,-2,spriteDummy} + return {"ItemIcon",0,11,8,-2,-2,spriteDummy} end -- Returns the icon for a given transformation name or ID diff --git a/main.lua b/main.lua index 6861cdc6..96d268a4 100644 --- a/main.lua +++ b/main.lua @@ -339,9 +339,10 @@ function EID:printBulletPoints(description, renderPos) local bpIcon = EID:handleBulletpointIcon(lineToPrint) if EID:getIcon(bpIcon) ~= EID.InlineIcons["ERROR"] then lineToPrint = string.gsub(lineToPrint, bpIcon .. " ", "") + textColor = EID:renderString(bpIcon, renderPos + Vector(-3 * EID.Config["Scale"], 0), textScale , textColor) + else + textColor = EID:renderString(bpIcon, renderPos, textScale , textColor) end - - textColor = EID:renderString(bpIcon, renderPos, textScale , textColor) end textColor = EID:renderString(lineToPrint, renderPos + Vector(12 * EID.Config["Scale"], 0), textScale, textColor) renderPos.Y = renderPos.Y + EID.lineHeight * EID.Config["Scale"]