diff --git a/api/api.lua b/api/api.lua index 1d146e46..94b38b03 100644 --- a/api/api.lua +++ b/api/api.lua @@ -1183,8 +1183,11 @@ end -- [ Set Castbar Shield ] -- Colors a castbar for a cast that none of the player's own interrupts or -- silences can stop. The bar and the icon's border both take the shield color, --- so the state still reads on a bar configured without an icon. Not shielded --- restores the normal cast/channel color and the configured border. +-- so the state still reads on a bar configured without an icon. The fill also +-- gets diagonal stripes, tiled at the image's own size so they keep their +-- spacing as the fill grows or shrinks. They sit on OVERLAY, under the bar's +-- text on the same layer. Not shielded restores the normal cast/channel color +-- and the configured border. -- 'bar' [frame] the castbar statusbar -- 'icon' [frame] the icon frame, or nil for a bar without one -- 'shielded' [bool] whether the cast is uninterruptible @@ -1196,6 +1199,18 @@ function pfUI.api.SetCastbarShield(bar, icon, shielded, isChannel) bar:SetStatusBarColor(pfUI.api.GetStringColor(C.appearance.castbar[isChannel and "channelcolor" or "castbarcolor"])) end + if shielded and not bar.shieldstripes then + bar.shieldstripes = bar:CreateTexture(nil, "OVERLAY") + bar.shieldstripes:SetTexture(pfUI.media["img:stripes"]) + bar.shieldstripes:SetHorizTile(true) + bar.shieldstripes:SetVertTile(true) + bar.shieldstripes:SetVertexColor(1, 1, 1, .3) + bar.shieldstripes:SetAllPoints(bar:GetStatusBarTexture()) + end + if bar.shieldstripes then + bar.shieldstripes:SetShown(shielded) + end + local iconborder = icon and icon.backdrop if not iconborder then return end diff --git a/img/stripes.tga b/img/stripes.tga new file mode 100644 index 00000000..598dae0c Binary files /dev/null and b/img/stripes.tga differ diff --git a/modules/castbar.lua b/modules/castbar.lua index 26b35e5e..afd4b06d 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -231,7 +231,7 @@ pfUI:RegisterModule("castbar", function () CreateBackdropShadow(cb.bar) -- text left - cb.bar.left = cb.bar:CreateFontString("Status", "DIALOG", "GameFontNormal") + cb.bar.left = cb.bar:CreateFontString("Status", "OVERLAY", "GameFontNormal") cb.bar.left:ClearAllPoints() cb.bar.left:SetPoint("TOPLEFT", cb.bar, "TOPLEFT", 3 + C.castbar[unitstr].txtleftoffx, C.castbar[unitstr].txtleftoffy) cb.bar.left:SetPoint("BOTTOMRIGHT", cb.bar, "BOTTOMRIGHT", -3 + C.castbar[unitstr].txtleftoffx, C.castbar[unitstr].txtleftoffy) @@ -242,7 +242,7 @@ pfUI:RegisterModule("castbar", function () cb.bar.left:SetJustifyH(C.castbar[unitstr].namealign or "LEFT") -- text right - cb.bar.right = cb.bar:CreateFontString("Status", "DIALOG", "GameFontNormal") + cb.bar.right = cb.bar:CreateFontString("Status", "OVERLAY", "GameFontNormal") cb.bar.right:ClearAllPoints() cb.bar.right:SetPoint("TOPLEFT", cb.bar, "TOPLEFT", 3 + C.castbar[unitstr].txtrightoffx, C.castbar[unitstr].txtrightoffy) cb.bar.right:SetPoint("BOTTOMRIGHT", cb.bar, "BOTTOMRIGHT", -3 + C.castbar[unitstr].txtrightoffx, C.castbar[unitstr].txtrightoffy) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index f92ae839..7fbf216d 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -1237,7 +1237,7 @@ pfUI:RegisterModule("nameplates", function () end end) - castbar.text = castbar:CreateFontString("Status", "DIALOG", "GameFontNormal") + castbar.text = castbar:CreateFontString("Status", "OVERLAY", "GameFontNormal") castbar.text:SetPoint("RIGHT", castbar, "LEFT", -4, 0) castbar.text:SetNonSpaceWrap(false) castbar.text:SetTextColor(1,1,1,.5) @@ -1247,7 +1247,7 @@ pfUI:RegisterModule("nameplates", function () castbar.timer:SetFormatter(castFormatter) castbar.onExpire = function() ExpireCast(nameplate) end - castbar.spell = castbar:CreateFontString("Status", "DIALOG", "GameFontNormal") + castbar.spell = castbar:CreateFontString("Status", "OVERLAY", "GameFontNormal") castbar.spell:SetPoint("CENTER", castbar, "CENTER") castbar.spell:SetNonSpaceWrap(false) castbar.spell:SetTextColor(1,1,1,1)