Ok, still not working. First I tried the following, basicallly filling in with details that I found.
Code:
local myLevelBlock =
{
anchor =
{
anchor_pt = "TOPLEFT",
relative_to = "$parent_Power",
xOfs = 80,
yOfs = 0,
},
options =
{
enabled = true,
size = 35,
inset = 0,
strata = nil,
level = 2,
label =
{
enabled = true,
fontsize = 16,
justifyH = "RIGHT",
justifyV = "MIDDLE",
anchor_pt = "RIGHT",
xOfs = 0,
yOfs = 1,
color = { r = 0, g = 0.83, b = 0, a = 1 },
},
},
};
if nUI_UnitSkins[skinName] then
nUI_UnitSkins[skinName].elements["Level"] = myLevelBlock;
end
I also tried the following to see if we need to hook into an event. Still no joy.
Code:
local myLevelBlock =
{
anchor =
{
anchor_pt = "TOPLEFT",
relative_to = "$parent_Power",
xOfs = 80,
yOfs = 0,
},
options =
{
enabled = true,
size = 35,
inset = 0,
strata = nil,
level = 2,
label =
{
enabled = true,
fontsize = 16,
justifyH = "RIGHT",
justifyV = "MIDDLE",
anchor_pt = "RIGHT",
xOfs = 0,
yOfs = 1,
color = { r = 0, g = 0.83, b = 0, a = 1 },
},
},
};
local frame = CreateFrame( "Frame", "nUI_HUDLevel", UIParent );
local function onEvent()
if nUI_UnitSkins[skinName] then
nUI_UnitSkins[skinName].elements["Level"] = myLevelBlock;
end
end
frame:SetScript( "OnEvent", onEvent );
frame:RegisterEvent( "VARIABLES_LOADED" );
If I take the Level Block and add it directly to the Skin code in nUI it works just the way I want it to. Just can't get the add on to do the any thing.