Target level on HUD
Could you add the target's level to the HUD? I know this information is in the Unit Frame, but it would be really handy to have it right up there next to the target name since that is where I get most of the information when looking at a new target.
|
Quote:
|
Would it be possible to add this as an optional plugin for nUI instead of adding it to the core of nUI?
|
It could be done that way by twiddling the HUD skins in the same way that the aura buttons plugin twiddles the unit frame skins.
|
Could you point me to where the target name/class information is rendered for the HUD? I could look at making a plugin that would do this.
|
Quote:
To see how to modify existing default layouts from a mod, check out http://www.wowinterface.com/download...raButtons.html which modifies the existing unit frame skins for the player, target, pet and vehicle to change their aura displays from bars to buttons. You will, of course, have to replace the unit frame skin references with HUD skin references. Then all you have to do is spin through the HUD element skins you want to add the ["Level"] element to in in the same way. |
Ok, I made the modification to the HUD lua, just to understand how to do it. Next I need to figure out how to do the same thing in a Mod. Overriding the original HUD display seems the way to go.
Still learning lua, and I haven't had much time this week to play with it. I need to figure out if it is possible to simply add the element to the existing skin features, or if it will be necessary to override the entire skin. |
Quote:
Look at the aura buttons mod... it will show you how to do it. |
Quote:
|
Quote:
Code:
local myLevelBlock = |
Ok, still not working. First I tried the following, basicallly filling in with details that I found.
Code:
local myLevelBlock = Code:
local myLevelBlock = |
Okay.. first of all.. it should be hooked into an event and it should be executed on the "ADDON_LOADED" event so that we're sure it does not try to update nUI's default layout tables until after we know that have been loaded and initialized and before any user customization is applied which occurs in the "VARIABLES_LOADED" event.
Second, and this may sound silly... but did you ever give "skinName" a value? Code:
local skins = |
Still no joy. It seems to me that matching the nUI_UnitSkin[] by the name "PlayerTarget" is simply wrong. The skin names are completely different in the nUI/Main/constants.lua file. I tried making them match as per nUI_Aurabuttons code, but still got no matches. I put in some logging and this seems to be the essential problem. Nothing I tried matched a skin name, so I never see it add the Level block.
For me it is no longer worth the effort. For my own use it is much much simpler to add the Level block directly to the nUI code. So I guess I'll do that for my wife and I for now and not share :( |
Post what you have so far at an attachment and I'll fix it for you.
|
1 Attachment(s)
Ok, I made an attachment. Have a look and tell me what I'm missing.
The version I'm sending hasn't been tested. I tried several things and still got nothing to work, so this is kind of where I said give me my java compiler.:p -- Stev |
1 Attachment(s)
Wow... you were REALLY close... this worked for me, hopefully it does for you as well.
|
1 Attachment(s)
Yep that worked. So I was on the right track. Just had to match against the right part of the enumerated list, eh?
For those interested, the attachment to this message will work if you want to try it out. Make sure you enable the addon after unzipping to your Addons folder. |
I might suggest two things...
1) Post this in the nUI Customization forum for those who look in there 2) Consider uploading it to http://www.wowinterface.com/downloads/cat133.html Glad it's working :D -- Like I said, you were REALLY close. Good job! |
It'll have to wait until I have time to add a screen shot preview as it appears they expect one for uploads here.
|
All times are GMT -6. The time now is 12:08 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI