Add Class Resources and Debuff Highlighting modules; migrate settings to AceDB profiles
Move CoA settings from E.global/E.private into a proper AceDB-3.0 database (CoA.db, SavedVariables ElvUI_CoADB) with a Profiles options tab, since ElvUI doesn't ship AceDBOptions-3.0 (vendored under Libraries/). Add ClassResources.lua: hooks the custom-class resource frames (segment bar, orb, bar, multi-cast bar) into ElvUI's Toggle Anchors, with a per-frame hide checkbox in a new "Class Resources" options tab. Add DispelHighlight.lua: highlights dispellable debuffs on unitframes, with talent-aware filtering for custom classes. Fix mover/anchor reliability for Class Resources and the Instance (LayerPicker) button: - Movers were only retried until the target frame existed, not until the mover was actually created, so frames that start at zero size (e.g. a resource bar before that resource is ever active) permanently lost their mover. - Class resource frames re-anchor themselves on refresh, stomping the mover's anchor; hook SetPoint to snap back to the mover holder whenever something else repositions the frame. - Native click-drag on these frames ends with the engine calling SetPoint directly, severing the mover anchor entirely. Permanently block drag (script and RegisterForDrag) instead of clearing it once.
This commit is contained in:
@@ -44,7 +44,7 @@ end
|
||||
local function UpdateSize(button)
|
||||
button = button or _G[BUTTON_NAME]
|
||||
if button then
|
||||
local size = E.global.CoA.extraActionButtonSize or 52
|
||||
local size = CoA.db.profile.extraActionButtonSize or 52
|
||||
button:SetSize(size, size)
|
||||
UpdateRimEdge(button, size)
|
||||
UpdateHotkeyPosition(button, size)
|
||||
@@ -124,7 +124,7 @@ local function SkinButton(button, container)
|
||||
rim:SetAllPoints(icon)
|
||||
rim:SetFrameLevel(button.backdrop:GetFrameLevel() + 10)
|
||||
button.CoARim = rim
|
||||
UpdateRimEdge(button, E.global.CoA.extraActionButtonSize or 52)
|
||||
UpdateRimEdge(button, CoA.db.profile.extraActionButtonSize or 52)
|
||||
|
||||
button:SetFrameLevel(rim:GetFrameLevel() + 1)
|
||||
end
|
||||
@@ -158,13 +158,13 @@ local function SkinButton(button, container)
|
||||
end
|
||||
|
||||
local function SetupMover(container, button)
|
||||
if CoA.extraActionBarMoverCreated then return end
|
||||
if CoA.extraActionBarMoverCreated then return true end
|
||||
|
||||
local width, height = button:GetSize()
|
||||
if width == 0 or height == 0 then return end
|
||||
if width == 0 or height == 0 then return false end
|
||||
|
||||
local left, bottom = button:GetLeft(), button:GetBottom()
|
||||
if not left or not bottom then return end
|
||||
if not left or not bottom then return false end
|
||||
|
||||
CoA.extraActionBarMoverCreated = true
|
||||
|
||||
@@ -191,6 +191,8 @@ local function SetupMover(container, button)
|
||||
else
|
||||
Anchor()
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local function TryHook()
|
||||
@@ -198,11 +200,11 @@ local function TryHook()
|
||||
local button = _G[BUTTON_NAME]
|
||||
|
||||
if container and button then
|
||||
SetupMover(container, button)
|
||||
SkinButton(button, container)
|
||||
return SetupMover(container, button)
|
||||
end
|
||||
|
||||
return container ~= nil and button ~= nil
|
||||
return false
|
||||
end
|
||||
|
||||
function CoA:InitializeExtraActionBar()
|
||||
|
||||
Reference in New Issue
Block a user