Skip to content

Commit

Permalink
Castbar Text added.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wutname1 committed Jul 22, 2018
1 parent ab508bc commit 2d1f88a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Components/Nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ local NamePlateFactory = function(frame, unit)
cast:SetPoint('TOP', frame.Health, 'BOTTOM', 0, 0)
cast:SetSize(frame:GetWidth(), 4)
cast:SetStatusBarTexture(BarTexture)
cast:SetStatusBarColor(1, 0.7, 0)
if SUI.DBMod.NamePlates.ShowCastbarText then
cast.Text = cast:CreateFontString()
SUI:FormatFont(cast.Text, 7, 'Player')
cast.Text:SetJustifyH('CENTER')
cast.Text:SetJustifyV('MIDDLE')
cast.Text:SetAllPoints(cast)
end

-- Add latency display
cast.SafeZone = cast:CreateTexture(nil, 'OVERLAY')
Expand Down Expand Up @@ -154,6 +162,7 @@ function module:OnInitialize()
ShowName = true,
ShowLevel = true,
ShowCastbar = true,
ShowCastbarText = true,
ShowTarget = true,
FlashOnInterruptibleCast = true
}
Expand Down Expand Up @@ -217,6 +226,17 @@ function module:BuildOptions()
SUI.DBMod.NamePlates.ShowCastbar = val
end
},
ShowCastbarText = {
name = L['Show castbar text'],
type = 'toggle',
order = 3,
get = function(info)
return SUI.DBMod.NamePlates.ShowCastbarText
end,
set = function(info, val)
SUI.DBMod.NamePlates.ShowCastbarText = val
end
},
ShowTarget = {
name = L['Show target'],
type = 'toggle',
Expand Down

0 comments on commit 2d1f88a

Please sign in to comment.