From 7e8d818ba4c4dee08bdedaabb0fe47da5b69b5a0 Mon Sep 17 00:00:00 2001 From: kochetov2000 <67761691+kochetov2000@users.noreply.github.com> Date: Sat, 4 Dec 2021 16:12:30 +0300 Subject: [PATCH] Edit EID.Config["Scale"] on EID.Scale --- eid_api.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index 5659864d..31b947a5 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -591,7 +591,7 @@ function EID:filterIconMarkup(text, textPosX, textPosY) for word in string.gmatch(text, "{{.-}}") do local textposition = string.find(text, 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}) text = string.gsub(text, word, EID:generatePlaceholderString(lookup[3]), 1) end @@ -612,13 +612,13 @@ function EID:renderInlineIcons(spriteTable, posX, posY) else spriteObj:Update() 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 -- helper function to render Icons in specific EID settins 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:Render(Vector(posX, posY), nullVector, nullVector) end @@ -664,7 +664,7 @@ function EID:filterColorMarkup(text, baseKColor) local lookup, isColor = EID:getColor(word, lastColor) if isColor then 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 table.insert(textPartsTable, {preceedingText, lastColor, preceedingTextWidth}) lastColor = lookup