-
-
Notifications
You must be signed in to change notification settings - Fork 9
RegisterCallback
StormFX edited this page Mar 21, 2023
·
2 revisions
The RegisterCallback method of the Group API registers a callback at the group level.
-- Uses a local function.
local function func(Group, Option, Value)
-- Do stuff.
end
MSQ_Group:RegisterCallback(func)-- Uses a table method.
function tbl.func(self, Group, Option, Value)
-- Do stuff.
end
MSQ_Group:RegisterCallback(tbl.func, tbl)Notes
- Callbacks registered to a group will only be fired when that group's skin settings change.
{Group}:RegisterCallback(func [, {arg})| 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. |
Notes
- If
funcis a reference to a table method,argis required.
func = function([self,] {Group}, "Option", Value) end| Parameter | Type | Description |
|---|---|---|
{Group} |
table | The group object that fired the callback. |
"Option" |
string | The name of the setting that was changed. |
Value |
boolean | The value that Option was changed to. |
The following table lists the possible callback returns. This will allow authors to target specific settings and their respect values.
| Setting Name | Value Type |
|---|---|
"Backdrop" |
boolean |
"Disabled" |
boolean |
"Gloss" |
boolean |
"Pulse" |
boolean |
"Reset" |
boolean |
"Scale" |
number |
"Shadow" |
boolean |
"SkinID" |
string |
"UseScale" |
boolean |
10.0.7 100007
- 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