Hi all,
I'll preface this by admitting that I'm very new to all of this; outside of editing the lua of existing addons, I don't have much experience and I'm pretty much learning as I go.
My first question is about documentation--I've not found much other than the in-line documentation in the oUF code and the boilerplate. Does anything along these lines exist?
I've had a go at spawning a player health bar; it's not throwing up any errors but isn't displaying either. I feel like I might have missed something really obvious, but after an hour of checking various bits I just can't work it out. Can anyone point me in the right direction?
EDIT: Having tested, my party frames have disappeared too.
Thanks in advance! I have oUF where it should be (unembedded) and have a single TOC entry pointing to a single LUA file (which I've pasted in its entirety below):
Lua Code:
local _, ns = ...
local UnitSpecific = {
player = function(self) -- Player Specific Code
end,
party = function(self) -- Party Specific Code
end,
}
local Shared = function(self, unit) -- Shared Unit Code
local Health = CreateFrame('StatusBar', nil, self) -- Create Health Bar
Health:SetSize(300, 20)
Health:SetPoint('TOPLEFT', UIParent, "TOPRIGHT", 0, 0)
Health:SetPoint('BOTTOMLEFT', UIParent, "BOTTOMRIGHT", 0, 0)
local HealthBG = Health:CreateTexture(nil, 'BACKGROUND') -- Create Health Background
HealthBG:SetAllPoints(Health)
HealthBG:SetTexture(1, 1, 1, .5)
Health.colorClass = true
Health.colorReaction = true
HealthBG.multiplier = .5
Health.bg = HealthBG
self.Health = Health
if(UnitSpecific[unit]) then
return UnitSpecific[unit](self)
end
end
oUF:RegisterStyle("jUI", Shared) --Register Style with oUF
oUF:Factory(function(self)
self:SetActiveStyle("jUI")
self:Spawn("player"):SetPoint('CENTER')
local party = self:SpawnHeader(nil, nil, 'raid,party,solo',
'showParty', true,
'showPlayer', true,
'yOffset', -20
)
party:SetPoint("TOPLEFT", 30, -30)
end)