Monday, April 16, 2012

UnitPopup or Unit Right-click Menus

Hi peeps,

I've got a problem I'm not sure how to solve, so I thought I'd ask you folks ;)

Basically, I have a couple of AddOns that add extra buttons to the unit frame right click menus.

For example, PartySpotter has a Highlight option that lets you track that Party/Raid/BG player on the map and minimap.

So for example, you could target a BG team mate, right click on their unit frame, select 'Highlight' and then they would appear on both the map and minimap with a red 'X', so you can easily see/track them.

I achieve this by adding to UnitPopup arrays, but this is causing an 'Action Blocked' error when trying to use either the Set Focus or Clear Focus options from the same menus.



So my question is, is there a way to add extra options to these unit frame right click menus without causing this taint issue ?



If anyone knows of an AddOn that achieves this without blocking focus actions then I'd love to hear about it ;)



( I'm aware of some other conditions to do with drop down boxes that cause the same problem and am in the process of addressing those issues in my AddOns - although imho I think this is mainly a WoW bug ;p )|||I'm having the same taint issue with one of my own addons, and have been looking for a fix for some time. It's an issue with Blizzard's UIDropdown code and happens when an addon calls a dropdown with more menu items than the Blizzard default. If your issue is the same thing (and the error report is the same) this may help explain the problem, although there is not yet a solution:

http://www.wowinterface.com/forums/s...d.php?p=105001

http://forums.worldofwarcraft.com/th...249478&sid=1#0|||Yeah, I have a feeling this is all connected, and the problem with the number of entries is the issue that I can fix / work around. (I have a sneaky fix if you're interested - although it isn't a universal fix, and Atlas still causes taint.)

Anyway, in that particular case, its an issue of how many buttons you create in your own drop down boxes - leading to taint in drop down boxes you weren't trying to change.

In the specific case I'm talking about here, I'm actually wanting to add options to an existing blizzard unit drop down list, so it may not be possible without tainting.

The fact that it is causing the same error as the 'buggy' number of entries issue, gives me hope that when Blizzard resolve that problem, then my problem will also go away...



But in the mean time I'm just wondering if anyone knows of any AddOns that add more buttons to the Target Right-click menu ?

Probably they are also encountering this problem, but if not, I'd love to know how they got around the problem ;)|||I did wonder what was causing it those errors on a couple of mods, now that I've read this it makes sense. I haven't seen any mod that's manage to achieve this without the taint yet.|||

Oh well. For now, I'm just gonna offer a slash command that enables/disables the AddOn right click menus.

Not everyone needs the drop down box Focus actions, and they still work from key bindings, macros, etc. so I'll leave it up to the user which menu button they want the most - focus <or> addon



I guess if Blizzard never changes this, then I'll make the temporary slash commands in to more permanent options...

No comments:

Post a Comment