[Enhancement] Right click menu on frame
b-morgan opened this issue · 8 comments
I think it would be useful to have a right-click menu on the health frame. Menu options I'd like to see are lock or unlock frame, hide frame, and disable addon. This last option should, of course, never be needed because there will be no bugs! :-)
Would it be possible to do "add as focus"? This might even warrant a key binding as well.
I was afraid that focus would be a problem, but thanks for looking into it! I'm not sure about the taint issues, that's why you are in charge. Skillet just punts whenever it sees combat!
A menu should be possible to implement, though I wonder if dropdowns are still riddled with taint issues.
Not sure if focus is feasible, as that would require a UnitID to pass to the FocusUnit function, so it would only work if the bodyguard is one of the valid UnitIDs at the moment focus is requested (like target, targettarget et.c).
Actually, scrap that last part, FocusUnit is fully protected it seems. Probably the same issue that made/make many unit frame addons replace the focus option with "Use /focus to focus".
Latest commit added a dropdown, looking like this:
Due to how frames cannot be clickthrough when mouse interaction is enabled (to catch the right click to open menu), I've added an option to enable/disable menu. This also means the options in the dropdown are a bit limited, but not very much.
When frame is unlocked through the menu, a popup is shown to lock it again:
If using Curse client, setting preferred release type to Alpha should update to that commit (assuming I have pushed them to WoWAce, in this case I have).
Otherwise, just do git pull
if you cloned this.
With git installed, you can go into the AddOns folder and do git clone git://github.com/SharpWoW/BodyguardHealth.git
in a command window, when updating, go into that folder and do git pull
to pull the latest commit pushed to GitHub (which may contain outright broken code sometimes).