Thread Tools Display Modes
Unread 10-30-09, 12:24 PM   #1
meli
A Murloc Raider
Join Date: Apr 2009
Posts: 7
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.
meli is offline  
Unread 10-30-09, 03:51 PM   #2
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
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.
__________________
Xrystal is offline  
Unread 10-30-09, 05:13 PM   #3
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
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.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 10-30-09, 06:41 PM   #4
meli
A Murloc Raider
Join Date: Apr 2009
Posts: 7
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 is offline  
Unread 10-30-09, 08:09 PM   #5
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
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.

Originally Posted by meli View Post
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)
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 11-05-09, 09:43 AM   #6
meli
A Murloc Raider
Join Date: Apr 2009
Posts: 7
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)
Attached Thumbnails
Click image for larger version

Name:	nUI-Change.png
Views:	760
Size:	2.00 MB
ID:	3531  
meli is offline  
Unread 11-05-09, 11:13 AM   #7
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Originally Posted by meli View Post
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.
__________________
Xrystal is offline  
Unread 11-05-09, 01:57 PM   #8
meli
A Murloc Raider
Join Date: Apr 2009
Posts: 7
Originally Posted by Xrystal View Post
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.
meli is offline  
Unread 11-06-09, 07:19 AM   #9
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
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.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 11-06-09, 10:02 AM   #10
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
I'm wondering Scott if the overlays over the underlying frames are getting in the way of the mouseover tests.
__________________
Xrystal is offline  
Unread 11-07-09, 07:24 AM   #11
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
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.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-07-10, 01:31 PM   #12
devxwill
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 1
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...
devxwill is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » Adding Function to the nUI UnitFrames

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