diff --git a/Frostforge/Core/CastBars.lua b/Frostforge/Core/CastBars.lua
index 2bcc4be..e5f2d86 100644
--- a/Frostforge/Core/CastBars.lua
+++ b/Frostforge/Core/CastBars.lua
@@ -41,15 +41,23 @@ function C:Artwork(config)
return config.castBarArt
end
--- Complete cast artwork is registered around one shared transparent opening.
+-- Register the painted rails, not the differently padded transparent canvases.
-- Outer contours are never sampled out of a thin unit-shell strip. Corners use
-- the same horizontal/vertical scale; only connecting spans fit the native bar.
function C:Pieces(entry,w,h,weight,padding,mirror)
local factor=1.25*weight
local scale=math.min(h/32, .65)*factor
+ local limits=J.CastBorderFitLimits
+ -- One common cap keeps every design usable at extreme weight / tiny bars.
+ -- A design never changes corner scale just because its class changed.
+ scale=math.min(scale,(w+2*padding)*.95/limits[1],(h+2*padding)*.95/limits[2])
local side=48*scale
- local x={-padding-side,-padding,w+padding,w+padding+side}
- local y={-padding-side,-padding,h+padding,h+padding+side}
+ local inset=entry.castInsets
+ local left=(mirror and inset[3] or inset[1])*scale
+ local right=(mirror and inset[1] or inset[3])*scale
+ local top,bottom=inset[2]*scale,inset[4]*scale
+ local x={-padding-side+left,-padding+left,w+padding-right,w+padding+side-right}
+ local y={-padding-side+top,-padding+top,h+padding-bottom,h+padding+side-bottom}
local u=mirror and {512,464,48,0} or {0,48,464,512}
local v={0,48,80,128}
local pieces={}
@@ -149,7 +157,9 @@ function C:Paint(module,id,layout)
module.assetOK=true
for name,piece in pairs(pieces) do
local texture=module.textures[name]
- if layout then
+ if layout or module.id~=id then
+ -- Only our unprotected texture regions move on an identity change;
+ -- the native bar and the decoration's frame anchor stay untouched.
texture:ClearAllPoints();texture:SetPoint("TOPLEFT",module.frame,"TOPLEFT",piece.x,-piece.y)
texture:SetSize(piece.w,piece.h)
end
diff --git a/Frostforge/Core/Core.lua b/Frostforge/Core/Core.lua
index e77c995..073af4f 100644
--- a/Frostforge/Core/Core.lua
+++ b/Frostforge/Core/Core.lua
@@ -2,7 +2,7 @@ local addonName, J = ...
-- Keep the addon folder and saved-variable keys stable for existing installs.
J.Brand = { name="Jiberish's Frostforge", shortName="Frostforge", website="https://theigloo.io" }
local Core = {
- version = "0.9.10",
+ version = "0.9.11",
modules = {}, clients = {}, owned = {}, notices = {},
order = { "minimap", "playerFrame", "targetFrame", "focusFrame", "actionHub" },
settingsOrder = { "minimap", "playerFrame", "targetFrame", "focusFrame", "targetTargetFrame", "partyFrames", "actionHub" },
diff --git a/Frostforge/Core/SmallFrames.lua b/Frostforge/Core/SmallFrames.lua
index 290e8f4..8fdc552 100644
--- a/Frostforge/Core/SmallFrames.lua
+++ b/Frostforge/Core/SmallFrames.lua
@@ -136,7 +136,7 @@ function S:Paint(module,kind,id,config,layout)
module.assetOK=true
if kind=="border" then
local entry=J.UnitSkinCatalog.entries[id]
- if layout then
+ if layout or module.id~=id then
local pieces=J.CastBars:FitPieces(entry,g.w,g.h,config.smallFrameWeight,config.smallFramePadding,g.mirror,config.unitFrameWidth,config.unitFrameHeight)
for name,p in pairs(pieces) do
local t=module.textures[name]
diff --git a/Frostforge/Frostforge.toc b/Frostforge/Frostforge.toc
index dd7072e..8a75e3c 100644
--- a/Frostforge/Frostforge.toc
+++ b/Frostforge/Frostforge.toc
@@ -4,7 +4,7 @@
## X-Website: https://theigloo.io
## Notes: Optional sculpted unit-frame skins and fantasy portrait surrounds with Blinkii, mMediaTag, ElvUI and EllesmereUI support, matching cast-bar borders, action hubs and minimap artwork. In-game validation pending.
## Author: Jiberish
-## Version: 0.9.10
+## Version: 0.9.11
## SavedVariables: JiberishUIDB
## SavedVariablesPerCharacter: JiberishUICharacterDB
## OptionalDeps: LibSharedMedia-3.0, Blizzard_UnitFrame, Blizzard_ActionBar, Blizzard_Minimap, Blizzard_GameMenu, Blinkiis_Portraits, ElvUI, ElvUI_mMediaTag, EllesmereUI, EllesmereUIUnitFrames, EllesmereUIRaidFrames, EllesmereUIResourceBars, EllesmereUIActionBars, EllesmereUIMinimap
@@ -20,6 +20,7 @@ Core\Hubs.lua
Themes\Minimaps.lua
Core\Minimaps.lua
Themes\UnitSkins.lua
+Themes\CastBorders.lua
Core\UnitSkins.lua
Core\CastBars.lua
Core\SmallFrames.lua
diff --git a/Frostforge/Themes/CastBorders.lua b/Frostforge/Themes/CastBorders.lua
new file mode 100644
index 0000000..1f12ee6
--- /dev/null
+++ b/Frostforge/Themes/CastBorders.lua
@@ -0,0 +1,53 @@
+local _, J = ...
+-- Generated by tools/measure_cast_borders.py; original artwork stays unchanged.
+-- Transparent inset from each shared slice boundary to the painted rail.
+local insets = {
+ CLASS_DEATHKNIGHT = {3,7,3,2},
+ CLASS_DEMONHUNTER = {9.5,1,9.5,2},
+ CLASS_DRUID = {5,12,11.5,3},
+ CLASS_EVOKER = {8,3,8,2},
+ CLASS_HUNTER = {2,1,2,1},
+ CLASS_MAGE = {2,5,3,4},
+ CLASS_MONK = {2,2,2,2},
+ CLASS_PALADIN = {10,1,10,1},
+ CLASS_PRIEST = {23,4,23,2},
+ CLASS_ROGUE = {8,3,8,1},
+ CLASS_SHAMAN = {21,4,21.5,2},
+ CLASS_WARLOCK = {4,8,4.5,1},
+ CLASS_WARRIOR = {8,2,8,2},
+ FACTION_ALLIANCE = {13,1,13,1},
+ FACTION_HORDE = {7.5,2,9,2},
+ FACTION_NEUTRAL = {7,2,7,2},
+ RACE_BLOODELF = {11,0,11,0},
+ RACE_DARKIRONDWARF = {15,0,15,0},
+ RACE_DRACTHYR = {8,3,8,3},
+ RACE_DRAENEI = {4.5,0,5,1},
+ RACE_DWARF = {12,1,12,1},
+ RACE_EARTHENDWARF = {5,2,5,2},
+ RACE_GNOME = {8,1,8,1},
+ RACE_GOBLIN = {7,1,7,2},
+ RACE_HARANIR = {12,3,12,3},
+ RACE_HIGHMOUNTAINTAUREN = {10,3,10,2},
+ RACE_HUMAN = {23,2,23,2},
+ RACE_KULTIRAN = {13,1,13,1},
+ RACE_LIGHTFORGEDDRAENEI = {3,3,3,2},
+ RACE_MAGHARORC = {10.5,3,10.5,2},
+ RACE_MECHAGNOME = {2,1,2,1},
+ RACE_NIGHTBORNE = {15,0,15,0},
+ RACE_NIGHTELF = {3,1,3,1},
+ RACE_ORC = {11,4,11,2},
+ RACE_PANDAREN = {4,3,3.5,1},
+ RACE_SCOURGE = {1,12,2,6},
+ RACE_TAUREN = {3,2,3,1},
+ RACE_TROLL = {16,1,15.5,1},
+ RACE_VOIDELF = {4,2,5,2},
+ RACE_VULPERA = {6,3,5.5,2},
+ RACE_WORGEN = {14,1,14,1},
+ RACE_ZANDALARITROLL = {6,2,7,1},
+}
+J.CastBorderFitLimits = {0,0}
+for id, inset in pairs(insets) do
+ J.UnitSkinCatalog.entries[id].castInsets = inset
+ J.CastBorderFitLimits[1] = math.max(J.CastBorderFitLimits[1],inset[1]+inset[3])
+ J.CastBorderFitLimits[2] = math.max(J.CastBorderFitLimits[2],inset[2]+inset[4])
+end
diff --git a/artwork/cast-bars/index.html b/artwork/cast-bars/index.html
index 07d843a..867f087 100644
--- a/artwork/cast-bars/index.html
+++ b/artwork/cast-bars/index.html
@@ -10,7 +10,7 @@