Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-27-09, 01:13 AM   #1
ahhnam
A Murloc Raider
Join Date: Aug 2009
Posts: 6
New to creating oUF needs help

I am pretty new to programming so for the past week I was looking into other people's oUF files to try to get a basic understanding of what to do and come up with something that doesn't seem to work properly and I can't really figure out why and was just wondering if anyone can give me some pointers. Thank you.

Code:
-- Framework

local function Func(self, unit)
	self.colors = colors
	self.menu = menu
	
	self:RegisterForClicks('anyup')
	self:SetAttribute('*type2', 'menu')
	
	self:SetScript('OnEnter', UnitFrame_OnEnter)
	self:SetScript('OnLeave', UnitFrame_OnLeave)
	
	self:SetBackdrop(backdrop)
	self:SetBackdropColor(0, 0, 0)

-- Health Frame
	
	self.Health = CreateFrame('StatusBar', nil, self)
	self.Health:SetHeight(20)
	self.Health:SetWidth(200)
	self.Health:SetPoint("TOPLEFT")
	self.Health:SetPoint("TOPRIGHT")
	self.Health:SetStatusBarTexture(minimalist)
	self.Health.frequentUpdates = true
	self.Health.colorSmooth = true
	self.Health.colorClass = true
	
	self.Health.bg = self.Health:CreateTexture(nil, 'BORDER')
	self.Health.bg:SetAllPoints(self.Health)
	self.Health.bg:SetTexture(0.3, 0.3, 0.3)
--

-- Power Frame

	self.Power = CreateFrame('StatusBar', nil, self)
	self.Power:SetHeight(3)
	self.Power:SetWidth(200)
	self.Power:SetPoint("TOPLEFT", self.Health, "BOTTOMLEFT", 0, -3)
	self.Power:SetPoint("TOPRIGHT", self.Health, "BOTTOMRIGHT", 0, -3)
	self.Power.colorSmooth = true
	self.Power.frequentUpdates = true
	self.Power.colorPower = true
--

end

oUF:RegisterStyle('3xp', Func)
oUF:SetActiveStyle('3xp')

oUF:Spawn('player'):SetPoint('CENTER', UIParent, -220, -250)
Yep that's it, I tried to see if I can get the basic working before going further and so far it's still failing.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » New to creating oUF needs help


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