mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-22 20:10:50 +00:00
addonbuttons: accept frame names as an argument
This commit is contained in:
@@ -310,10 +310,17 @@ pfUI:RegisterModule("addonbuttons", function ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ManualAddOrRemove(action)
|
local function ManualAddOrRemove(msg)
|
||||||
local button = GetMouseFocus()
|
local _, _, action, arg = string.find(msg, "%s?(%w+)%s?(.*)")
|
||||||
|
|
||||||
if action ~= "reset" and action ~= "add" and action ~= "del" then
|
local button
|
||||||
|
if arg and arg ~= "" then
|
||||||
|
button = getglobal(arg)
|
||||||
|
else
|
||||||
|
button = GetMouseFocus()
|
||||||
|
end
|
||||||
|
|
||||||
|
if action == "" or (action ~= "reset" and action ~= "add" and action ~= "del") then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpf|rUI Addon Button Panel:")
|
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpf|rUI Addon Button Panel:")
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/abp add|r - " .. T["Add button to the frame"])
|
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/abp add|r - " .. T["Add button to the frame"])
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/abp del|r - " .. T["Remove button from the frame"])
|
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/abp del|r - " .. T["Remove button from the frame"])
|
||||||
|
|||||||
Reference in New Issue
Block a user