WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Developer Chat (https://www.wowinterface.com/forums/forumdisplay.php?f=96)
-   -   Adding Function to the nUI UnitFrames (https://www.wowinterface.com/forums/showthread.php?t=28250)

meli 10-30-09 12:24 PM

Adding Function to the nUI UnitFrames
 
Alright, so I use nUI exclusively now, and I find that I want to remove dependance upon some external add ons. So...

The first item on my list is adding support to the unit frames to enable me to use buttons 3-5 on the mouse on the unit frames, ala grid, vuhdo or others.

I just started poking around in the code, and figure before I start tweaking things, I'd ask first. Any suggestions on a good starting point? nUI_Unit.lua looks like the correct place.

Xrystal 10-30-09 03:51 PM

Editing the lua files themselves is something that Scott would prefer people not to do. For one thing the files are interellated and you could very well cause problems later on.

However, Scott is normally fine with suggestions. For example he incorporated a counter for debuffs and buffs on targets ala inline aura that I used alot with omnicc. With that addtion I could turn off 2 separate addons as nUI now handles them.

As to the unit frames as far as I am aware clique on its own should work with the unit frames themselves although I am not sure how much of the unit frame is clickable with all the extra information available on the frame as overlays.

spiel2001 10-30-09 05:13 PM

It's far more likely that you want to edit [ Interface > AddOns > nUI > Units > nUI_UnitFrame.lua ] if you're dead set on doing this though I do agree with Xrystal that this is something I generally discourage given the potential for side effects. And, to be perfectly honest, I'm not sure what "programming" you can do to address those buttons... these are honest to goodness Bliz unit frames and should already support whatever they support. Aside from hard coding special attributes for certain frames, I' m not sure what would make those buttons work in Grid and not in nUI and if you want to code special attributes, then it is no longer portable between player or characters.

All of that said, if someone can tell me how to "fix" this then I'll be happy to include it in the core code. Otherwise, it's going to have to wait for nUI6 when you have the ability to customize the attributes of unit frames on a per character basis.

meli 10-30-09 06:41 PM

I guess I should have mentioned that I am a professional programmer with 20+ years of C, Pascal, Java, C#, JavaScript, Python, Perl, Ruby, Basic experience that has been working with Lua for a year or so :-).

I think the big issue is going to be setting up a UI to bind the mouse botton events to the frames. I'll do some digging and keep it modular enough that you can choose to implement it or not (assuming I go forward with it)

spiel2001 10-30-09 08:09 PM

I wouldn't get too wrapped around the axle on it since pretty much the entire existing code base is being replaced by nUI6. However, if you're good at encapsulation, modular solutions and interface design then the work you do could be plugged into nUI6.

Quote:

Originally Posted by meli (Post 164120)
I guess I should have mentioned that I am a professional programmer with 20+ years of C, Pascal, Java, C#, JavaScript, Python, Perl, Ruby, Basic experience that has been working with Lua for a year or so :-).

I think the big issue is going to be setting up a UI to bind the mouse botton events to the frames. I'll do some digging and keep it modular enough that you can choose to implement it or not (assuming I go forward with it)


meli 11-05-09 09:43 AM

1 Attachment(s)
After thinking about how you want this accomplished and a solution that would meet my goals (eg, not waste screen space and memory overhead) with VuhDo, the least amount of change would be simply addressing the attached screenshot.

At issue is that apparently mouseover macros do not work when mouse over the nUI unit frames. If that works, then the ability to bind mouse events to the unitframes themselves is not necessary.

Looking at the code, I do not know if this can be done yet. (still researching)

Xrystal 11-05-09 11:13 AM

Quote:

Originally Posted by meli (Post 164785)
After thinking about how you want this accomplished and a solution that would meet my goals (eg, not waste screen space and memory overhead) with VuhDo, the least amount of change would be simply addressing the attached screenshot.

At issue is that apparently mouseover macros do not work when mouse over the nUI unit frames. If that works, then the ability to bind mouse events to the unitframes themselves is not necessary.

Looking at the code, I do not know if this can be done yet. (still researching)

From memory, as it has been while since I tested mouseover macros with nUI, but I recall the macro only working on the unit frames if you hovered over the name area only.

meli 11-05-09 01:57 PM

Quote:

Originally Posted by Xrystal (Post 164794)
From memory, as it has been while since I tested mouseover macros with nUI, but I recall the macro only working on the unit frames if you hovered over the name area only.

Just tested, it does not appear to work on any portion of the unit frame today.

spiel2001 11-06-09 07:19 AM

I'm not sure what this issue would be there since the nUI unit frames use the Blizzard secure unit frame template and should, therefore, support whatever features the Blizzard unit frames support.

Xrystal 11-06-09 10:02 AM

I'm wondering Scott if the overlays over the underlying frames are getting in the way of the mouseover tests.

spiel2001 11-07-09 07:24 AM

They shouldn't since the overlays are (currently) all unit frames as well... and clickable themselves. I suppose it's possible though. It would be an interesting idea to go with a transparent hit box unit frame that sits on top of a collection of non-secure display frames... a very interesting idea. I'll have to play with that.

devxwill 01-07-10 01:31 PM

mouseovers seem to work for me with any "key" based macro such as

Code:

/cast [target=mouseover] Healing Touch
When the above macro is bound to, lets say 2, then it works fine. When it stops working is when I bind it to MouseWheelUp, at that point it only works on the "name" portion of the unitframe.

The odd thing is, on the other portions of the unitframe, it does not tell me i have no target, it just simply does not cast...

This keeps me using Vuhdo...


All times are GMT -6. The time now is 11:57 AM.

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