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_HUDMODE_RM_HUDLAYOUT_PLAYERTARGET = 6;
RM_HUDLAYOUT_PLAYERTARGET = "RM_HUDLayout_PlayerTarget";
nUI_L[RM_HUDLAYOUT_PLAYERTARGET.."Desc"] = "RM HUD: Player Left / Target Right";
nUI_L[RM_HUDLAYOUT_PLAYERTARGET.."Label"] = "RM HUD";
local frame = CreateFrame( "Frame", "nUI_Hud_RM", UIParent );
local function onEvent()
for skin in pairs( nUI_UnitSkins ) do
nUI_UnitSkins[skin] = nUI_UnitSkins[skin];
end
end
frame:SetScript( "OnEvent", onEvent );
frame:RegisterEvent( "VARIABLES_LOADED" );
|