Add Extra Action Button keybind with hotkey text, resizable size slider, and recentered anchor

This commit is contained in:
2026-07-13 18:11:07 +02:00
parent db6c7d79b0
commit d5b67920a6
4 changed files with 94 additions and 6 deletions
+37 -2
View File
@@ -3,11 +3,17 @@ local EP = E.Libs.EP
local AddOnName = ...
BINDING_HEADER_COA = "Conquest of Azeroth"
local CoA = E:NewModule("CoA", "AceEvent-3.0", "AceTimer-3.0")
E.CoA = CoA
V.CoA = {}
P.CoA = {
extraActionButtonSize = 52,
}
local function getOptions()
local options = {
order = 55,
@@ -19,13 +25,42 @@ local function getOptions()
order = 1,
type = "group",
name = "Extra Action Button",
args = {},
args = {
header = {
order = 1,
type = "header",
name = "Extra Action Button",
},
size = {
order = 2,
type = "range",
name = "Size",
desc = "Adjust the width/height of the Extra Action Button, in pixels.",
min = 30,
max = 100,
step = 1,
get = function() return E.db.CoA.extraActionButtonSize end,
set = function(_, value)
E.db.CoA.extraActionButtonSize = value
if CoA.UpdateExtraActionButtonSize then
CoA:UpdateExtraActionButtonSize()
end
end,
},
},
},
instanceSwap = {
order = 2,
type = "group",
name = "Instance Swap",
args = {},
args = {
header = {
order = 1,
type = "header",
name = "Instance Swap",
},
},
},
},
}