-
-
Notifications
You must be signed in to change notification settings - Fork 11
Group API
Masque's Group API provides authors with the means to interact with Masque's skinning engine at the group level. Using a group's meta-methods, authors can add or remove groups and buttons, retrieve skin settings, or refresh a group or button's skin in the event of a conflict.
A button group is a collection of buttons that are part of a common frame, object or add-on. These groups allow Masque to organize the buttons logically and to display them in a user-friendly way in Masque's interface. The following example demonstrates the group hierarchy.
- AddOn
- Bar1
- Bar1Button1
- Bar1Button2
- Bar1Button3
- Bar2
- Bar2Button1
- Bar2Button2
...
Notes
- While the add-on group and its sub-groups can each have their own buttons, only the add-on group can have sub-groups. This limitation is intentional to prevent excessive nesting.
In order to access the methods for a group, one first needs to establish a reference to Masque's API. Once established, the author can then create a new group or retrieve a reference to an existing group by calling the Group
API method.
-- Establish a reference to Masque.
local Masque, MSQ_Version = LibStub("Masque", true)
if Masque then
-- Retrieve a reference to a new or existing group.
local myGroup = Masque:Group("myAddon", "myBar1")
end
The following table lists the methods available to the Group API along with descriptions of their purpose. For more information about a particular method's usage, visit its page by clicking the relevant link.
Method | Description |
---|---|
AddButton |
Adds a button to the calling group and applies its skin. |
Delete |
Removes the calling group and any sub-groups or buttons. |
GetColor |
Returns a set of color values assigned to a region. |
GetLayer |
Returns the specified region assigned to a button. |
GetOptions |
Returns an AceConfig-3.0 options table for a group. |
RemoveButton |
Removes a button from the calling group and applies a default skin. |
ReSkin |
Reapplies a group's skin to its buttons. |
SetCallback |
Registers a callback at the group level. |
SetName |
Changes the name of the calling group and updates Masque's GUI. |
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