Added description cache clear when changing Textbox width via MCM

This commit is contained in:
Wofsauge committed 2022-01-23 22:52:39 +01:00
1 parent 3ff3a6f249
commit fc05ea0907
2 files changed
+7 -2

No files matched your search

+6 -2
View File
@@ -581,13 +581,17 @@ function EID:printDescription(desc)
end
end
if previousDesc ~= desc.Description then
previousFormattedLines = {}
previousBulletpoints = {}
EID:clearDescriptionCache()
previousDesc = desc.Description
end
EID:printBulletPoints(desc.Description, renderPos)
end
function EID:clearDescriptionCache()
previousFormattedLines = {}
previousBulletpoints = {}
end
function EID:printBulletPoints(description, renderPos)
local textboxWidth = tonumber(EID.Config["TextboxWidth"])
local textScale = Vector(EID.Scale, EID.Scale)
+1
View File
@@ -350,6 +350,7 @@ if MCMLoaded then
end,
OnChange = function(currentNum)
EID.Config["TextboxWidth"] = currentNum
EID:clearDescriptionCache()
end,
Info = {"Default = 130, varies per language","Width of the EID textbox, in pixels"}
}