-
-
Notifications
You must be signed in to change notification settings - Fork 11
SetCallback
StormFX edited this page Mar 21, 2023
·
3 revisions
WARNING: This method has been deprecated and will be removed in a future update.
The SetCallback
method of the Group API registers a callback at the group level.
-- Uses a local function and returns the GroupID.
local function func(GroupID, Group, SkinID, Backdrop, Shadow, Gloss, Colors, Disabled)
-- Do stuff.
end
MSQ_Group:SetCallback(func)
-- Uses a table method and returns the group object.
function tbl.func(self, obj, Group, SkinID, Backdrop, Shadow, Gloss, Colors, Disabled)
-- Do stuff.
end
MSQ_Group:SetCallback(tbl.func, tbl, true)
Notes
- Callbacks registered to a group will only be fired when that group's skin settings change.
- If
true
is passed as the third parameter, the first parameter of the callback will be the group object that fired the callback. Otherwise, the group's stringID
field is returned.
{Group}:SetCallback(func [, {arg} [, selfCB]])
Parameter | Type | Required | Description |
---|---|---|---|
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. |
selfCB |
boolean | No | Determines whether the group object or the string GroupID is returned as the first parameter of the callback function. |
Notes
- If
func
is a reference to a table method,arg
is required.
func = function("GroupID" or {obj}, "Group", "SkinID", Backdrop, Shadow, Gloss, {Colors}, Disabled) end
Parameter | Type | Description |
---|---|---|
GroupID |
string | The internal ID of the add-on or group whose callback was fired. |
obj |
table | The group object that fired the callback. |
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. |
10.0.2 100002
- Added the
selfCB
parameter.
8.2.5 80200
- Method added.
Wiki
• Home
Project
• Contributors
• History
Reference
⚬ Masque API
⚬ Group API
• AddButton()
• Delete()
• GetColor()
• GetLayer()
• GetOptions()
• RegisterCallback()
• RemoveButton()
• ReSkin()
• SetCallback()
• SetName()
⚬ Regions
Skins
• Skin List
Mirrors
• CurseForge
• Wago.io
• Wow Interface