Added description cache clear when changing Textbox width via MCM
This commit is contained in:
1 parent
3ff3a6f249
commit
fc05ea0907
2 files changed
+7
-2
No files matched your search
@@ -581,13 +581,17 @@ function EID:printDescription(desc)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if previousDesc ~= desc.Description then
|
if previousDesc ~= desc.Description then
|
||||||
previousFormattedLines = {}
|
EID:clearDescriptionCache()
|
||||||
previousBulletpoints = {}
|
|
||||||
previousDesc = desc.Description
|
previousDesc = desc.Description
|
||||||
end
|
end
|
||||||
EID:printBulletPoints(desc.Description, renderPos)
|
EID:printBulletPoints(desc.Description, renderPos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EID:clearDescriptionCache()
|
||||||
|
previousFormattedLines = {}
|
||||||
|
previousBulletpoints = {}
|
||||||
|
end
|
||||||
|
|
||||||
function EID:printBulletPoints(description, renderPos)
|
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)
|
||||||
|
|||||||
@@ -350,6 +350,7 @@ if MCMLoaded then
|
|||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.Config["TextboxWidth"] = currentNum
|
EID.Config["TextboxWidth"] = currentNum
|
||||||
|
EID:clearDescriptionCache()
|
||||||
end,
|
end,
|
||||||
Info = {"Default = 130, varies per language","Width of the EID textbox, in pixels"}
|
Info = {"Default = 130, varies per language","Width of the EID textbox, in pixels"}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user