Quantcast need help getting code to work - WoWInterface
Thread Tools Display Modes
09-19-09, 12:33 AM   #1
A Cyclonian
rossman's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 39
need help getting code to work

First off I would like to say I do not know anything about lua programming. I would like to understand any explanations you give so please try and help me learn.
I created a hud addon called nUI_Hud_RM that works as just a replacement to the default player\target nUI hud and it works good. I am trying to get my hud layout to be in the hud rotation not just a replacement.
I based this code on the info panel code layout thinking they would work the same way. I tried different variations but cant get it to work. I am hoping that between all of the good programmers on this board we should get this working and I can learn along the way.
Thank You all in advance

This is the nUI_Hud_RM.lua

if not nUI_HUDLayouts then nUI_HUDLayouts = {}; end
if not nUI_UnitSkins then nUI_UnitSkins = {}; end

nUI_L[RM_HUDLAYOUT_PLAYERTARGET.."Desc"] = "RM HUD: Player Left / Target Right";

local frame = CreateFrame( "Frame", "nUI_Hud_RM", UIParent );

local function onEvent()

for skin in pairs( nUI_UnitSkins ) do
nUI_UnitSkins[skin] = nUI_UnitSkins[skin];


frame:SetScript( "OnEvent", onEvent );
frame:RegisterEvent( "VARIABLES_LOADED" );
09-19-09, 07:12 AM   #2
nUI Maintainer
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,236
Well I just tried adding a new hud layout but errors big time so I guess there is something else I am missing.

I copied the PlayerTarget HUD folder and renamed the PlayerTarget section with XrystalPT and the PLAYERTARGET with XRYSTALPT.

I then edited the XML file in the Layout Folder and copied the PlayerTarget section and converted it to XrystalPT.

I then added XrystalPT and XRYSTALPT elements to the localization file.

No luck, errors abounded. I am now commenting out until Scott can confirm if the current setup in nUI allows us to do this or not.
09-19-09, 12:39 PM   #3
A Cyclonian
rossman's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 39
When I started testing this morning I was able to get the RM Hud in the rotation but it does not show the hud layout when selected only a broken(only the bars show no text) nUI playertarget and the when you get to the original nUI playerparget selection that layout is also broken (only the bars no text). So I am getting closer.

I would guess I am not adding my layout to the table of Hudlayouts but mixing it with the nUI playertarget.

How much of the HudLayouts\playertarget\RM_HUDLAYOUT_PLAYERTARGET.lua and the associated unit files need to be modified to make it a new hud. I am using the code that works for the replacemnt of the nUI playertarget hud.

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » need help getting code to work

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