WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   UnitFrame:SetAttribute change? (https://www.wowinterface.com/forums/showthread.php?t=53847)

Fizzlemizz 07-06-16 03:54 PM

UnitFrame:SetAttribute change?
 
Is it just me being behind the learning curve or are "*type1" and "*type2" attributes for frames inheriting the SecureUnitButtonTemplate now unable to be changed?

I know it was possible up to 5.x because way back when DUF was modified to use menu instead of togglemenu which would cause an error trying to set a focus target.

Now (6.2.4), no matter what they are set to, I always get leftclick target rightclick popup menu.

"*type3", 4 and 5 can still be modified.

Edit: for version.

myrroddin 07-06-16 04:12 PM

Pretty certain type1 and type2 were locked to address the setting of a focus target. You can look at Clique's code to make certain, as there was a time where Clique could override those. I'm not sure if it still can.

Fizzlemizz 07-06-16 04:20 PM

Setting of the focus target was fixable by using "togglemenu" as the value for the type attribute. That's how I fixed DUF in 5.4.

It seems a bit overkill to set it in stone because somone doesn't know the correct value when one is actually available.

Resike 07-06-16 05:25 PM

You should be able to freely change thoose.

Fizzlemizz 07-06-16 06:26 PM

Edit: It appears to work as expected in Legion beta but not 6.2.4.

I agree you should but, explicitly setting "*type1", "*type2" to nil or "assist" I still get left/target, right/popup.

I was under the impression they actually had to be explicitly set before the buttons did anything but I see:

Code:

function SecureUnitButton_OnLoad(self, unit, menufunc)
    self:SetAttribute("*type1", "target");
    self:SetAttribute("*type2", "menu");
    self:SetAttribute("unit", unit);
    self.menu = menufunc;
end


Resike 07-07-16 01:44 AM

Seems like you are right, i guess they messed up something with the latest build.

Fizzlemizz 07-07-16 10:53 AM

Thanks Resike.


All times are GMT -6. The time now is 02:36 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI