Skip to content

AddButton

StormFX edited this page Dec 13, 2022 · 1 revision

Contents

The AddButton method of the Group API adds a button to the calling group and then applies the group's skin settings to the button's regions.

Example

MSQ_Group:AddButton(Button1, Button1.__Regions, "Aura")
Notes

  • If the button is currently assigned to another group, it and its regions are reassigned to the calling group.
  • If the calling group is disabled, no skin settings will be applied.

Signature

{Group}:AddButton({Button} [, {Regions} [, "Type" [, Strict ]]])

Parameters

Parameter Type Required Description
Button table Yes A reference to the button object to be skinned.
Regions table No A table containing references to the button's regions that are to be skinned.
Type string No The type of button being passed.
Strict boolean No Limits skinning to the regions passed in the Regions table.
Notes

  • The Regions table is only optional if the button is derived from a native template, eg. ActionButtonTemplate, or uses the same region naming conventions.
  • Not passing a Regions table will increases Masque's overhead as it has to first locate any missing regions.
  • The Regions table may be passed as an element of the button if assigned to the .__Regions field.
  • The Type parameter is used to determine which regions to search for if unavailable in the Regions table. If Type is not set, Masque will attempt to determine the type. Failing that, it will iterate all regions for all types.

8.2.5 80200

  • Added the Type and Strict parameters.

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