diff --git a/Gladius/frame.lua b/Gladius/frame.lua index 71b916b..3476820 100644 --- a/Gladius/frame.lua +++ b/Gladius/frame.lua @@ -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 @@ -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 diff --git a/Gladius/localization/enUS.lua b/Gladius/localization/enUS.lua index 5e6f3d9..45a2c2a 100644 --- a/Gladius/localization/enUS.lua +++ b/Gladius/localization/enUS.lua @@ -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" diff --git a/Gladius/media/CastBar/ui-castingbar-spark.blp b/Gladius/media/CastBar/ui-castingbar-spark.blp new file mode 100644 index 0000000..248563c Binary files /dev/null and b/Gladius/media/CastBar/ui-castingbar-spark.blp differ diff --git a/Gladius/media/CastBar/ui-castingbar-spark2.blp b/Gladius/media/CastBar/ui-castingbar-spark2.blp new file mode 100644 index 0000000..d1a9201 Binary files /dev/null and b/Gladius/media/CastBar/ui-castingbar-spark2.blp differ diff --git a/Gladius/options.lua b/Gladius/options.lua index 76776ca..02f8939 100644 --- a/Gladius/options.lua +++ b/Gladius/options.lua @@ -80,6 +80,7 @@ local defaults = { raceText=true, specText=true, castBar=true, + castBarSpark=true, powerBar=true, classIcon=true, targetIcon=false, @@ -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",