From 1c1be19711d0456d8a74f72cb6b8f74b0c397d9b Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 2 Nov 2026 23:31:32 -0600 Subject: [PATCH] Castbars: stripe the fill of uninterruptible casts with a tiled texture The shield draws img/stripes on OVERLAY, anchored to the fill with horizontal and vertical tiling so the stripes keep their size as the bar fills. Castbar text moves from the invalid DIALOG layer (read as ARTWORK) to OVERLAY so it draws above the stripes. --- api/api.lua | 19 +++++++++++++++++-- img/stripes.tga | Bin 0 -> 1042 bytes modules/castbar.lua | 4 ++-- modules/nameplates.lua | 4 ++-- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 img/stripes.tga 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 0000000000000000000000000000000000000000..598dae0c15287dbd7dfe4e5599c18731b00ad4f7 GIT binary patch literal 1042 zcmd^*!3w}23`4_CJNgNJ+Wst`>KbTqc#2sJeHdrUoc#A42PWO