Skip to content

Commit

Permalink
Merge pull request #4 from Cortes-Jeremy/develop
Browse files Browse the repository at this point in the history
Added optional spark on the castbar
  • Loading branch information
Cortes-Jeremy authored Feb 22, 2021
2 parents 8d8c4cf + 267219d commit 720c139
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Gladius/frame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ function Gladius:CreateButton(i)
castBar.icon:SetPoint("RIGHT", castBar, "LEFT")
castBar.icon:SetTexCoord(0.1,0.9,0.1,0.9)

castBar.spark = castBar:CreateTexture(nil, "OVERLAY")
castBar.spark:SetTexture([[Interface\AddOns\Gladius\media\CastBar\ui-castingbar-spark2]])
castBar.spark:SetBlendMode("ADD")

if (db.castBar) then
castBar:Show()
end
Expand Down Expand Up @@ -885,6 +889,16 @@ function Gladius:UpdateFrame()
button.castBar.bg:SetWidth(button.castBar:GetWidth()+db.castBarHeight)
button.castBar.bg:SetHeight(button.castBar:GetHeight())

button.castBar.spark:ClearAllPoints()
button.castBar.spark:SetPoint("LEFT", button.castBar:GetStatusBarTexture(), "RIGHT", -16/2, 0)
button.castBar.spark:SetSize(16, button.castBar:GetHeight())

if (not db.castBarSpark) then
button.castBar.spark:Hide()
else
button.castBar.spark:Show()
end

if (not db.castBar) then
button.castBar:Hide()
elseif (not self.frame.testing and db.castBarOnCast) then
Expand Down
1 change: 1 addition & 0 deletions Gladius/localization/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ L["Scale of the frame"] = "Scale of the frame"
L["Frame padding"] = "Frame padding"
L["Padding of the frame"] = "Padding of the frame"
L["Show cast bars"] = "Show cast bars"
L["Show cast bars spark"] = "Show cast bars spark"
L["Show cast bars on cast"] = "Show cast bars on casting"
L["Show cast bars on casting"] = "Show cast bars only when enemy is casting (used to hide the castbar background when enemy is not casting)"
L["Hide spell rank"] = "Hide spell rank"
Expand Down
Binary file added Gladius/media/CastBar/ui-castingbar-spark.blp
Binary file not shown.
Binary file added Gladius/media/CastBar/ui-castingbar-spark2.blp
Binary file not shown.
11 changes: 9 additions & 2 deletions Gladius/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ local defaults = {
raceText=true,
specText=true,
castBar=true,
castBarSpark=true,
powerBar=true,
classIcon=true,
targetIcon=false,
Expand Down Expand Up @@ -772,17 +773,23 @@ function Gladius:SetupOptions()
desc=L["Show cast bars"],
order=1,
},
castBarSpark = {
type="toggle",
name=L["Show cast bars spark"],
desc=L["Show cast bars spark"],
order=3,
},
castBarOnCast = {
type="toggle",
name=L["Show cast bars on cast"],
desc=L["Show cast bars on casting"],
order=2,
order=4,
},
hideSpellRank = {
type="toggle",
name=L["Hide spell rank"],
desc=L["Hide spell rankD"],
order=3,
order=5,
},
showPets = {
type="toggle",
Expand Down

0 comments on commit 720c139

Please sign in to comment.