@Tarmac: Is there any way you could test to see which Skin package was causing the issue?
@Hammer2: The new ButtonFacade add-on is a replacement for the old ButtonFacade add-on that provides backward-compatibility. Short answer: Yes, but make sure it's the new one that's installed. It's included in the package and is automatically installed by the Curse Client.
Hi not sure if this a new issue or not but just updated to the latest Masque via curse and now when i skin my buttons they look fine then I use them via keybind or mouseclick they stay round but now have an ugly box around them any ideas as its making my ui look awful
Originally, I had included the LBF support into Masque. After a little thought, I decided that since I have to include a new "ButtonFacade" add-on anyhow, I'd just put it all into the "ButtonFacade" add-on. The add-on itself is relatively small and for the foreseeable future, I can't see any reason to remove it from the package. In short: At this point in time, LBF support is there to stay.
And while technically, an add-on author doesn't have to update, Masque does now save the skin settings, so all of those extra API calls by the add-on just add overhead and use up unnecessary space in its SV file.
As far as checking for it, the best way is how you have it:
local MSQ = LibStub("Masque", true)
if not MSQ then return end
And just as a pointer, I see a lot of authors calling something like:
-- do stuff
local LBF = LibStub("LibButtonFacade")
if LBF then
-- do stuff
Don't do that. If your sets of buttons (bars) are in separate files, use a local variable for the group. If not, use a do block or something.
You should also be able to keep your add-on compatible with LBF so that users who don't want to "switch" for whatever reason don't have issues. Just have two separate "skin support" files and at the top of the one for LBF, have it return if Masque is available.
Of course if you have any LBF-specific methods, you'll have do some magic there, but you know what I mean.
Also remember that if you change anything that Masque changes (Button size, etc), you have to call the group's ReSkin() method or it'll do weird stuff. :p
Ah ok, actually, using the do block is the kind of code I use :
local LBF = LibStub("LibButtonFacade", true)
if LBF then
local group = LBF:Group("Addon", "Group")
-- Do fancy stuff with button and group
-- No op
Yep. AuraFrames attempts to pull some information from the old ButtonFacade to put together its skin options. Since it hasn't been updated to use the new options method, it disables its skin options when it doesn't get what it's asking for. And since the font options are wrapped up into the skin options, you can't access it. :/
Hi, sorry to be a bother, but is there a way in the skins to take into account the scale of the button the skin is applied to?
That sounded more garbled then I intended :S Perhaps an example would clarify...
I'm using a pixel font for my keybind text, and I've got 3 sizes of button: 100%, 75% and 50%. Is there a way to say FontSize = 8 *1/buttonscale, so that on the non-100% buttons, it shows as the same size as the 100% one?
Your example would cause the text to shrink with the button, rather than staying the same size as buttons at 1.0 scale. Masque actually scales down the layers if the button's scale is smaller than 1.0, or scales up the layers if it's higher than 1.0.
That said, I'll be revisiting some changes I made with the recent release. One of those changes is the fonts. I'm going to see about perhaps incorporating them into an optional module rather than as part of the skin. That way, the user can select the font they wish to use (via SharedMedia), the font size and the alignment to the button.
The current implementation doesn't work quite as well as I had anticipated. It leaves no way for users to adjust the fonts according to their needs. It also causes a problem when different fonts have different character widths and different add-ons have their text layers at varying sizes/alignments.
I'll also be expanding the API a bit so that add-on authors can (once again) be notified of skin changes, etc.
StormFX, I may be missing something, but I cannot find any way to access Core:GetSkins() externally, as was possible with ButtonFacade.
Would you mind exposing it?
That, or provide a way to retrieve the skin table for a created group?
I understand it is not intended for anything but action buttons, but it has worked very well for my purposes, and was allowing users to skin XLoot along with the rest of their UI quite easily.