Skip to content

Commit

Permalink
assign formatting methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Aug 30, 2024
1 parent 26d3071 commit 1923f98
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Widgets/Texts/NameText.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,18 @@ function W:CreateNameText(button)
name = name or F:GetNickname(button.states.name, button.states.fullName)

if self.format ~= CUF.constants.NameFormat.FULL_NAME then
name = Util.FormatName(name, self.format)
name = self.FormatName(name, self.format)
end

Util.UpdateTextWidth(nameText.text, name, nameText.width, button)
self.UpdateTextWidth(nameText.text, name, nameText.width, button)
end

nameText.Update = Update
nameText.Enable = Enable
nameText.Disable = Disable

nameText.FormatName = Util.FormatName
nameText.UpdateTextWidth = Util.UpdateTextWidth
end

W:RegisterCreateWidgetFunc(const.WIDGET_KIND.NAME_TEXT, W.CreateNameText)

0 comments on commit 1923f98

Please sign in to comment.