Make skinning baseline behavior, restructure options into empty tabs
Skinning of both the ExtraActionBar and LayerPickerFrame buttons is no longer opt-in. Replaces the old single Skins tab and its toggles with two empty tabs, Extra Action Button and Instance Swap, for future per-frame settings.
This commit is contained in:
@@ -129,11 +129,8 @@ local function TryHook()
|
|||||||
|
|
||||||
if container and button then
|
if container and button then
|
||||||
SetupMover(container, button)
|
SetupMover(container, button)
|
||||||
|
|
||||||
if E.private.CoA.extraActionBar then
|
|
||||||
SkinButton(button)
|
SkinButton(button)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return container ~= nil and button ~= nil
|
return container ~= nil and button ~= nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -78,11 +78,8 @@ local function TryHook()
|
|||||||
if button then
|
if button then
|
||||||
DisableDrag(button)
|
DisableDrag(button)
|
||||||
SetupMover(button)
|
SetupMover(button)
|
||||||
|
|
||||||
if E.private.CoA.instance then
|
|
||||||
SkinButton(button)
|
SkinButton(button)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return button ~= nil
|
return button ~= nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,10 +6,7 @@ local AddOnName = ...
|
|||||||
local CoA = E:NewModule("CoA", "AceEvent-3.0", "AceTimer-3.0")
|
local CoA = E:NewModule("CoA", "AceEvent-3.0", "AceTimer-3.0")
|
||||||
E.CoA = CoA
|
E.CoA = CoA
|
||||||
|
|
||||||
V.CoA = {
|
V.CoA = {}
|
||||||
extraActionBar = true,
|
|
||||||
instance = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
local function getOptions()
|
local function getOptions()
|
||||||
local options = {
|
local options = {
|
||||||
@@ -18,34 +15,17 @@ local function getOptions()
|
|||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
name = string.format("|cff1784d1%s|r", "Conquest of Azeroth"),
|
name = string.format("|cff1784d1%s|r", "Conquest of Azeroth"),
|
||||||
args = {
|
args = {
|
||||||
skin = {
|
extraActionButton = {
|
||||||
order = 1,
|
order = 1,
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Skins",
|
name = "Extra Action Button",
|
||||||
get = function(info) return E.private.CoA[info[#info]] end,
|
args = {},
|
||||||
set = function(info, value)
|
|
||||||
E.private.CoA[info[#info]] = value
|
|
||||||
E:StaticPopup_Show("PRIVATE_RL")
|
|
||||||
end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = "Skins",
|
|
||||||
},
|
},
|
||||||
extraActionBar = {
|
instanceSwap = {
|
||||||
order = 2,
|
order = 2,
|
||||||
type = "toggle",
|
type = "group",
|
||||||
name = "Extra Action Bar",
|
name = "Instance Swap",
|
||||||
desc = "Skin the ExtraActionBar frame.",
|
args = {},
|
||||||
},
|
|
||||||
instance = {
|
|
||||||
order = 3,
|
|
||||||
type = "toggle",
|
|
||||||
name = "Instance",
|
|
||||||
desc = "Skin the LayerPickerFrame button.",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user