-
-
Notifications
You must be signed in to change notification settings - Fork 11
Register
WARNING: This method has been deprecated and will be removed in a future update.
The Register
method of Masque's API registers a callback at the add-on level. This callback is fired whenever a skin or state has changed within its group or groups.
-- Establish a reference to Masque.
local Masque, MSQ_Version = LibStub("Masque", true)
local function func(Addon, Group, SkinID, Backdrop, Shadow, Gloss, Colors, Disabled)
-- Do stuff.
end
Masque:Register("Addon", func)
-- Establish a reference to Masque.
local Masque, MSQ_Version = LibStub("Masque", true)
function obj.func(self, Addon, Group, SkinID, Backdrop, Shadow, Gloss, Colors, Disabled)
-- Do stuff.
end
Masque:Register("Addon", obj.func, obj)
Notes
- Any callbacks registered in this manner will be fired every time any group's settings have changed. To limit the firing of callbacks to a specific group, use the
SetCallback
method of the Group API.
{Masque}:Register("Addon", func [, {arg}])
Parameter | Type | Required | Description |
---|---|---|---|
Addon |
string | Yes | The name of the add-on registering the callback. |
func |
function | Yes | A reference to the function or method to be called. |
arg |
table | - | A reference to the table containing func . Required if a method is passed. |
func = function("Addon", "Group", "SkinID", Backdrop, Shadow, Gloss, {Colors}, Disabled) end
Parameter | Type | Description |
---|---|---|
Addon |
string | The name of the add-on whose callback was fired. |
Group |
string | The name of the group that fired the callback. |
SkinID |
string | The name of the skin assigned to the group. |
Backdrop |
boolean | Whether a Backdrop is assigned to the group. |
Shadow |
boolean | Whether a Shadow is assigned to the group. |
Gloss |
boolean | Whether a Gloss is assigned to the group. |
Colors |
table | A table containing the color settings. |
Disabled |
boolean | Whether the group is disabled. |
8.2.5 80200
- Signature updated:
func = function("Addon", "Group", "SkinID", Backdrop, Shadow, Gloss, {Colors}, Disabled) end
6.0.0 60000
- Signature updated:
func = function("Addon", "Group", "SkinID", Gloss, Backdrop, {Colors}, Disabled) end
5.0.387 50001
- Signature updated:
func = function("Addon", "Group", "SkinID", Gloss, Backdrop, {Colors}) end
Wiki
• Home
Project
• Contributors
• History
Reference
⚬ Masque API
• API_VERSION
• AddSkin
• AddSpellAlert
• AddType
• GetBackdrop
• GetDefaultSkin
• GetGloss
• GetGroupByID
• GetNormal
• GetShadow
• GetSlotIcon
• GetSkin
• GetSkins
• GetSpellAlert
• Group
• Register
• SetEmpty
• UpdateCharge
• UpdateSpellAlert
⚬ Group API
⚬ Regions
Skins
• Skin List
Mirrors
• CurseForge
• Wago.io
• Wow Interface