Adding option to hide certain bulletpoint icons
This commit is contained in:
1 parent
05c8209fb8
commit
4dad982a80
1 file changed
+3
-1
@@ -707,17 +707,19 @@ function EID:printBulletPoints(description, renderPos)
|
|||||||
local textboxWidth = tonumber(EID.Config["TextboxWidth"])
|
local textboxWidth = tonumber(EID.Config["TextboxWidth"])
|
||||||
local textScale = Vector(EID.Scale, EID.Scale)
|
local textScale = Vector(EID.Scale, EID.Scale)
|
||||||
description = EID:replaceShortMarkupStrings(description)
|
description = EID:replaceShortMarkupStrings(description)
|
||||||
|
description = EID:replaceMarkupSize(description)
|
||||||
for line in string.gmatch(description, "([^#]+)") do
|
for line in string.gmatch(description, "([^#]+)") do
|
||||||
local formatedLines = EID:fitTextToWidth(line, textboxWidth, EID.BreakUtf8CharsLanguage[EID:getLanguage()])
|
local formatedLines = EID:fitTextToWidth(line, textboxWidth, EID.BreakUtf8CharsLanguage[EID:getLanguage()])
|
||||||
local textColor = EID:getTextColor()
|
local textColor = EID:getTextColor()
|
||||||
for i, lineToPrint in ipairs(formatedLines) do
|
for i, lineToPrint in ipairs(formatedLines) do
|
||||||
-- render bulletpoint
|
-- render bulletpoint
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
local bpIcon = EID:handleBulletpointIcon(lineToPrint)
|
local bpIcon, rejectedIcon = EID:handleBulletpointIcon(lineToPrint)
|
||||||
if EID:getIcon(bpIcon) ~= EID.InlineIcons["ERROR"] then
|
if EID:getIcon(bpIcon) ~= EID.InlineIcons["ERROR"] then
|
||||||
lineToPrint = string.gsub(lineToPrint, bpIcon .. " ", "", 1)
|
lineToPrint = string.gsub(lineToPrint, bpIcon .. " ", "", 1)
|
||||||
textColor = EID:renderString(bpIcon, renderPos + Vector(-3 * EID.Scale, 0), textScale , textColor)
|
textColor = EID:renderString(bpIcon, renderPos + Vector(-3 * EID.Scale, 0), textScale , textColor)
|
||||||
else
|
else
|
||||||
|
if rejectedIcon then lineToPrint = string.gsub(lineToPrint, rejectedIcon .. " ", "", 1) end
|
||||||
textColor = EID:renderString(bpIcon, renderPos, textScale , textColor)
|
textColor = EID:renderString(bpIcon, renderPos, textScale , textColor)
|
||||||
end
|
end
|
||||||
EID.LastRenderCallColor = EID:copyKColor(textColor) -- Save line start Color for eventual Color Reset call
|
EID.LastRenderCallColor = EID:copyKColor(textColor) -- Save line start Color for eventual Color Reset call
|
||||||
|
|||||||
Reference in new issue
Block a user