Skip to content

RegisterCallback

StormFX edited this page Mar 21, 2023 · 2 revisions

Contents

The RegisterCallback method of the Group API registers a callback at the group level.

Examples

Function
-- Uses a local function.
local function func(Group, Option, Value)
  -- Do stuff.
end

MSQ_Group:RegisterCallback(func)
Method
-- 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.

Signature

{Group}:RegisterCallback(func [, {arg})

Parameters

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 func is a reference to a table method, arg is required.

Callback

Signature

func = function([self,] {Group}, "Option", Value) end

Parameters

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.

Returns

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

Clone this wiki locally