View Single Post
07-30-10, 12:44 AM   #14
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by Xruptor View Post
But wouldn't that make two styles show up rather then one?
What do you mean? Yeah, you would have two styles, but why care? Take a look at my main layout-file and scroll directly to the bottom.
You will notice, that I define one style for every single unit.

You could go with something like this:
Code:
local function yourStyle(self)
    -- do beautiful things here
end

local function yourPlayerCastbar(self)
    -- your player castbar code here
end

-- snip

oUF:RegisterStyle('oUF_yourStyle', yourStyle)
oUF:SetActiveStyle('oUF_yourStyle')
oUF:Spawn('player', 'playerframe'):SetPoint('CENTER', UIParent, 'CENTER', 0, 0)
-- spawn more frames,if you like
oUF:RegisterStyle('oUF_yourCastbar', yourPlayerCastbar)
oUF:SetActiveStyle('oUF_yourCastbar')
oUF:Spawn('player', 'player_castbar'):SetPoint('CENTER', UIParent, 'CENTER', 0, 40)
  Reply With Quote