Thread Tools Display Modes
10-29-14, 12:05 PM   #1
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Masque Questions

I 've been looking at masque to see if I could add compatibility for my addon, and I can't seem to find any information on what I need to do in order for masque to see my addon. If anyone knows how it's done and has time to share that'd be awesome thanks.
  Reply With Quote
10-29-14, 03:40 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Have you checked out its Documentation? http://www.wowace.com/addons/masque/pages/
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-29-14, 11:02 PM   #3
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Ya I've read through it again, and I just don't see what I need to do, to add my addon to have compatibility, any advice would be great.
  Reply With Quote
10-29-14, 11:57 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This part of the documentation is most relevant for addon authors:

http://www.wowace.com/addons/masque/pages/api/groups/

If you're still not able to figure it out, well, the exact code you need to write really depends on your addon. Are you just creating one button? Are you creating 1000 buttons in 10 distinct groups? Something in between? Post your code, or at least give a useful description of it.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-30-14, 06:56 AM   #5
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Basically you need to get a reference to Masque
Lua Code:
  1. local MSQ = LibStub("Masque")
create a group
Lua Code:
  1. local myGroup = MSQ:Group("MyAddon", "MyGroup")
and add your buttons to it.
Lua Code:
  1. myGroup:AddButton({Button} [, {ButtonData}])
  Reply With Quote
10-30-14, 08:40 AM   #6
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
My add-on is a replacement action bar ui, but I'm trying to add this into my custom button library so skins could be used for more customization.


Ok, well for button data would it be like
-- mybutton.floating

local ButtonData = {
FloatingBG = { "floatingBg"},
Or something like
-- mybutton.floating

local ButtonData = {
FloatingBG = { "$parentfloatingBg"},

Last edited by Fox536 : 10-30-14 at 08:43 AM.
  Reply With Quote
10-30-14, 09:51 AM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If your buttons inherit from the standard ActionButtonTemplate or have regions with the same names, you do not need to explicitly map out the ButtonData. Just register your button:

Code:
<group>:AddButton(<button>)
Also, the second argument to :Group is optional. If you only want one group for your addon (eg. "MyAddon") instead of sub-groups (eg. "MyAddon > Bar 1", "MyAddon > Bar 2") that can be skinned separately, you only need to pass one argument:

Code:
Masque:Group("MyAddon")
Again, however, without seeing your actual code, it's impossible to tell you exactly how you should register your buttons with Masque.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-30-14, 12:17 PM   #8
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Well when I get home I'll upload my most current version of my button library, I've been updating to fix a lot of what got messed up since 6.0.2, I've got most of the problems fixed, at least until they fix the issues with the mountJournal and I either write a work around for toys or they fix it. But I don't know off the top of my head if I even gave most of my textures names or not, I doubt I did as most of them didn't need names, but I can add names to them, if need be. I probably need to look at what the masque library does with the buttonData table. I'll post a link to my library as soon as I get to my pc though.
  Reply With Quote
10-30-14, 01:36 PM   #9
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Fox536 View Post
Ok, well for button data would it be like
-- mybutton.floating

local ButtonData = {
FloatingBG = { "floatingBg"},
I would say Masque expects object references as table values - not names.

Like
Lua Code:
  1. local ButtonData = {
  2.  FloatingBG = {<buttonobject>.floatingBg},
or
Lua Code:
  1. local ButtonData = {
  2.  FloatingBG = {_G[<buttonobject>:GetName().."floatingBg"]},
or whatever your actual code to reference the button object looks like.
  Reply With Quote
10-30-14, 02:50 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
It also expects the reference directly as the value, not in a sub-table:

Code:
ButtonData = {
     FloatingBG = <button>.floatingBG,
}
I'm not sure why you're adding those extra { brackets } around the values.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-30-14, 02:55 PM   #11
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Phanx View Post
I'm not sure why you're adding those extra { brackets } around the values.
Oh. I've copied that from the Masque description. :/
  Reply With Quote
10-30-14, 03:48 PM   #12
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
So I need a button table for each button added, that seems like an memory extensive way to do things lol, but I can try that and see if it works.
  Reply With Quote
10-30-14, 09:39 PM   #13
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Looks like that was the key, thanks for all the help guys.
  Reply With Quote
10-31-14, 09:22 PM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Fox536 View Post
So I need a button table for each button added, that seems like an memory extensive way to do things lol, but I can try that and see if it works.
It's probably better in the long run to simply create your action buttons using the standard ActionButtonTemplate, so they have the expected regions with the expected names. Otherwise it's going to be a lot of unnecessary work to make your addon compatible with other addons like Masque that are designed to do stuff with action buttons.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Masque Questions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off