Edit EID.Config["Scale"] on EID.Scale

This commit is contained in:
kochetov2000 authored and GitHub committed 2021-12-04 16:12:30 +03:00
1 parent e255321ca8
commit 7e8d818ba4
1 file changed
+4 -4
+4 -4
View File
@@ -591,7 +591,7 @@ function EID:filterIconMarkup(text, textPosX, textPosY)
for word in string.gmatch(text, "{{.-}}") do for word in string.gmatch(text, "{{.-}}") do
local textposition = string.find(text, word) local textposition = string.find(text, word)
local lookup = EID:getIcon(word) local lookup = EID:getIcon(word)
local preceedingTextWidth = EID:getStrWidth(string.sub(text, 0, textposition - 1)) * EID.Config["Scale"] local preceedingTextWidth = EID:getStrWidth(string.sub(text, 0, textposition - 1)) * EID.Scale
table.insert(spriteTable, {lookup, preceedingTextWidth}) table.insert(spriteTable, {lookup, preceedingTextWidth})
text = string.gsub(text, word, EID:generatePlaceholderString(lookup[3]), 1) text = string.gsub(text, word, EID:generatePlaceholderString(lookup[3]), 1)
end end
@@ -612,13 +612,13 @@ function EID:renderInlineIcons(spriteTable, posX, posY)
else else
spriteObj:Update() spriteObj:Update()
end end
EID:renderIcon(spriteObj, posX + sprite[2] + Xoffset * EID.Config["Scale"], posY + Yoffset * EID.Config["Scale"]) EID:renderIcon(spriteObj, posX + sprite[2] + Xoffset * EID.Scale, posY + Yoffset * EID.Scale)
end end
end end
-- helper function to render Icons in specific EID settins -- helper function to render Icons in specific EID settins
function EID:renderIcon(spriteObj, posX, posY) function EID:renderIcon(spriteObj, posX, posY)
spriteObj.Scale = Vector(EID.Config["Scale"], EID.Config["Scale"]) spriteObj.Scale = Vector(EID.Scale, EID.Scale)
spriteObj.Color = Color(1, 1, 1, EID.Config["Transparency"], 0, 0, 0) spriteObj.Color = Color(1, 1, 1, EID.Config["Transparency"], 0, 0, 0)
spriteObj:Render(Vector(posX, posY), nullVector, nullVector) spriteObj:Render(Vector(posX, posY), nullVector, nullVector)
end end
@@ -664,7 +664,7 @@ function EID:filterColorMarkup(text, baseKColor)
local lookup, isColor = EID:getColor(word, lastColor) local lookup, isColor = EID:getColor(word, lastColor)
if isColor then if isColor then
local preceedingText = string.sub(text, lastPosition, textposition - 1) local preceedingText = string.sub(text, lastPosition, textposition - 1)
local preceedingTextWidth = EID:getStrWidth(preceedingText) * EID.Config["Scale"] local preceedingTextWidth = EID:getStrWidth(preceedingText) * EID.Scale
lastPosition = textposition lastPosition = textposition
table.insert(textPartsTable, {preceedingText, lastColor, preceedingTextWidth}) table.insert(textPartsTable, {preceedingText, lastColor, preceedingTextWidth})
lastColor = lookup lastColor = lookup