Thread Tools Display Modes
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.
 
10-30-09, 03:51 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,919
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.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
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/
 
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)
 
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/
 
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:	1046
Size:	2.00 MB
ID:	3531  
 
 

WoWInterface » 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