Originally Posted by Phanx
1) Just start by making a frame.
Code:
local function Spawn(frame, unit, isSingle)
frame:SetPoint("CENTER", UIParent)
frame:SetSize(100, 25)
local bg = frame:CreateTexture(nil, "BACKGROUND")
bg:SetAllPoints(true)
bg:SetTexture(0, 0, 0, 0.5)
frame.bg = bg
end
oUF:RegisterLayout("10leej", Spawn)
oUF:SetActiveLayout("10leej")
oUF:Spawn("player")
Then add something else to it, like a name:
Code:
frame.bg = bg
local name = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
name:SetPoint("BOTTOM", frame, "TOP")
self:Tag(name, "[name]")
frame.Name = name
end
Then move on to other stuff, like a health bar, power bar, etc.
Have you looked at the Blizzard UI code? There's not much efficiency to be found in there.
|
Well if your just changing the texture and bar sizes its efficient enough for me.