Thread Tools Display Modes
07-06-16, 03:54 PM   #1
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-06-16, 04:12 PM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
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.
  Reply With Quote
07-06-16, 04:20 PM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-06-16, 05:25 PM   #4
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
You should be able to freely change thoose.
  Reply With Quote
07-06-16, 06:26 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
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
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-07-16 at 01:26 AM.
  Reply With Quote
07-07-16, 01:44 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Seems like you are right, i guess they messed up something with the latest build.
  Reply With Quote
07-07-16, 10:53 AM   #7
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Thanks Resike.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » UnitFrame:SetAttribute change?

Thread Tools
Display Modes

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