Fixed /keystone command; Fixed issues with nicknames

This commit is contained in:
Tercio Jose
2022-05-19 14:42:57 -03:00
parent 026aa2223a
commit c006675d94
10 changed files with 249 additions and 63 deletions
+16 -8
View File
@@ -2480,16 +2480,24 @@ end
for lineId = 1, self:GetNumLinesShown() do
local thisLine = self:GetLine(lineId)
local playerName = thisLine.lineText1
local text2 = thisLine.lineText2
local text3 = thisLine.lineText3
local text4 = thisLine.lineText4
--check if there's something showing in this line
if (thisLine.minha_tabela) then
local playerNameFontString = thisLine.lineText1
local text2 = thisLine.lineText2
local text3 = thisLine.lineText3
local text4 = thisLine.lineText4
local totalWidth = text2:GetStringWidth() + text3:GetStringWidth() + text4:GetStringWidth()
totalWidth = totalWidth + 50
local totalWidth = text2:GetStringWidth() + text3:GetStringWidth() + text4:GetStringWidth()
totalWidth = totalWidth + 40 - self.fontstrings_text_limit_offset
DetailsFramework:TruncateText(playerName, self.cached_bar_width - totalWidth) --this avoid truncated strings with ...
--playerName:SetWidth(self.cached_bar_width - totalWidth)
DetailsFramework:TruncateTextSafe(playerNameFontString, self.cached_bar_width - totalWidth) --this avoid truncated strings with ...
--these commented lines are for to create a cache and store the name already truncated there to safe performance
--local truncatedName = playerNameFontString:GetText()
--local actorObject = thisLine.minha_tabela
--actorObject.name_cached = truncatedName
--actorObject.name_cached_time = GetTime()
end
end
end
end