Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EllesmereUILocales/_keys.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Auto-generated by .tools/extract-locale-keys.sh -- do not edit by hand.
# Canonical list of translatable English keys passed as string literals
# (791 unique). Regenerate after wrapping new strings. Keys passed as
# (800 unique). Regenerate after wrapping new strings. Keys passed as
# variables are not listed here -- use the in-game /euiloc harvester for
# the complete runtime set.
(Raid)
Expand Down
6 changes: 3 additions & 3 deletions EllesmereUIOptions/EUI_PlayerAuraBars_ManagerPages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ local function DefaultBuffBarName(cfg)
end

-- Weapon-enchants-only is a fundamentally different shape of bar -- at most
-- three cells (main hand / off hand / ranged, see EUI_UnitFrames_
-- WeaponEnchants.lua's SLOTS, which matches Blizzard's own
-- three cells (main hand / off hand / ranged, the engine's own
-- AuraContainerItemEnchantmentSlot set, which matches Blizzard's
-- UpdateTemporaryEnchantmentBuffs) instead of a wrapping buff grid. Resize the
-- grid to fit on the way in and restore it on the way out.
--
Expand Down Expand Up @@ -570,7 +570,7 @@ local function BuildAssignedBuffsFields(frame, fontPath, sy, cfg, apply, isDefau
-- alone, so the row would be a dead switch on custom buff bars.
if isDefault then
items[#items + 1] = { key = PAB_WEAPON_ENCH_KEY, label = "Weapon Enchants",
tooltip = "Show weapon oil and imbue icons at the front of this bar. They are weapon enchants rather than auras, so they show independently of the options above -- and the aura grid is shifted inward to make room for them, with every row shifting over by the same amount." }
tooltip = "Show weapon oil and imbue icons at the front of this bar. They are weapon enchants rather than auras, so they show independently of the options above." }
end
items[#items + 1] = { isHeader = true, label = "Show", rightLabel = "Hide" }
for i = 1, #filters do
Expand Down
74 changes: 39 additions & 35 deletions EllesmereUIUnitFrames/EUI_UnitFrames_AuraContainers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1213,11 +1213,9 @@ local function AnchorContainer(container, frame, unit, base, s, buffContainer)
local mergedBuff = merged and isBuff
if mergedBuff then anchor = s.debuffAnchor end
if anchor == "none" then
-- Player buffs hidden: retire the weapon-enchant lead strip too.
if unit == "player" and isBuff and ns._weaponEnchUF then
ns._weaponEnchUF = nil
if ns.WeaponEnchants_Layout then ns.WeaponEnchants_Layout() end
end
-- Player buffs hidden: the weapon enchants ride this container (see
-- the declaration below), so ApplyGroupConfig's SetShown(false) takes
-- them down with it -- nothing to retire here.
return anchor
end

Expand Down Expand Up @@ -1308,36 +1306,38 @@ local function AnchorContainer(container, frame, unit, base, s, buffContainer)
container:SetPoint(ia, frame, fp, ox + offX, oy + cbOff + offY)
AK.SetContainerAnchor(container, ia)
if unit == "player" and isBuff then
-- Weapon enchant lead icons (oils/imbues are not auras; see
-- EUI_UnitFrames_WeaponEnchants.lua): ride the SAME resolved
-- anchor as the player's buff container so the strip leads it.
-- Published only while the broad-content mode admits generic
-- duration buffs (All Buffs or Has Duration -- the catch-all
-- gate) AND the buff display itself is on; renders with the
-- container's live style so customizations follow.
local broad = s.buffShowAll ~= false or s.buffHasDuration == true
local shownBuffs = (s.showBuffs ~= false)
or (s.debuffAnchorBuffs == true and (s.debuffAnchor or "none") ~= "none")
if broad and shownBuffs then
ns._weaponEnchUF = { frame = frame, ia = ia, fp = fp,
x = ox + offX, y = oy + cbOff + offY, gX = gX,
pad = EllesmereUI.PP.FromPixels(s.buffSpacingX or 1),
styleKey = StyleKey("player", "HELPFUL") }
-- Shift the engine run inward past the enchant cells (main
-- hand adjacent to the run; zero enchants = zero shift).
local n = (ns.WeaponEnchants_Count and ns.WeaponEnchants_Count()) or 0
if n > 0 then
local st = AK.styles[StyleKey("player", "HELPFUL")]
local w = (st and st.width) or 22
local sign = (gX == "RIGHT") and 1 or -1
local shift = sign * n * (w + EllesmereUI.PP.FromPixels(s.buffSpacingX or 1))
container:ClearAllPoints()
container:SetPoint(ia, frame, fp, ox + offX + shift, oy + cbOff + offY)
end
else
ns._weaponEnchUF = nil
end
if ns.WeaponEnchants_Layout then ns.WeaponEnchants_Layout() end
-- Weapon enchants are not auras: the engine's own item-
-- enchantment source renders them as a layout group flowed AHEAD
-- of the aura groups on this container (see
-- AK.AddItemEnchantmentsToContainer), so nothing is anchored and
-- no cells are reserved. Declared lazily and never removed (no
-- addon-facing unregister), so they follow this container's
-- visibility instead of the old broad-content gate.
local PP = EllesmereUI.PP
local w, h = ElementSize(unit, base, s)
local gap = PP.FromPixels(s.buffSpacingX or 1)
local lineGap = PP.FromPixels(s.buffSpacingY or 1)
local placement = CustomAuraContainerItemEnchantmentPlacement
local sortMethods = AuraContainerItemEnchantmentSortMethod
local sortDirs = AuraContainerSortDirection
AK.AddItemEnchantmentsToContainer(container, {
style = StyleKey("player", "HELPFUL"),
hidePermanent = true,
-- REVERSE keeps main hand adjacent to the aura run: the
-- engine puts the group's first element at the leading edge,
-- and Slot order is main hand, off hand, ranged.
sortMethod = sortMethods and sortMethods.Slot,
sortDirection = sortDirs and sortDirs.Reverse,
layout = {
elementWidth = w,
elementHeight = h,
elementSpacing = gap,
lineSpacing = lineGap,
-- No groupSpacing, see the aura groups' layout below.
groupLineSpacing = lineGap,
placement = placement and placement.BeforeAuraGroups,
},
})
end
end
AK.SetContainerGrowth(container, FlowDir(gX), FlowDir(gY))
Expand Down Expand Up @@ -1424,6 +1424,10 @@ local function ApplyGroupConfig(container, unit, base, s, chain, declared)
cand.excludeSpellIDs = ex
end

-- No groupSpacing: the engine trails every element with elementSpacing,
-- the last one of a group included, so a group boundary -- the seam
-- between the weapon-enchant cells and the first aura -- already sits one
-- spX away, and groupSpacing would double it.
local layout = { elementWidth = size, elementHeight = h, elementSpacing = spX, lineSpacing = spY }

-- Active set = "all" (a non-player BUFF element with no classes enabled)
Expand Down
Loading
Loading