Skip to content

Commit

Permalink
- GetUnboundedStringWidth to truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
cont1nuity committed Dec 4, 2024
1 parent 5d70694 commit 1dbc76c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Plater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7732,7 +7732,7 @@ end
end
end

while (nameString:GetStringWidth() > maxLength) do
while (nameString:GetUnboundedStringWidth() > maxLength) do
spellName = strsub (spellName, 1, #spellName - 1)
nameString:SetText (spellName)
if (string.len (spellName) <= 1) then
Expand Down Expand Up @@ -7781,7 +7781,7 @@ end
return
end

while (nameString:GetStringWidth() > stringSize) do
while (nameString:GetUnboundedStringWidth() > stringSize) do
name = strsub (name, 1, #name-1)
nameString:SetText (name)
if (string.len (name) <= 1) then
Expand Down Expand Up @@ -10493,7 +10493,7 @@ end
return
end

while (fontString:GetStringWidth() > maxWidth) do
while (fontString:GetUnboundedStringWidth() > maxWidth) do
text = strsub (text, 1, #text - 1)
fontString:SetText (text)
if (string.len (text) <= 1) then
Expand Down

0 comments on commit 1dbc76c

Please sign in to comment.