View Single Post
11-14-10, 01:06 PM   #17
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Originally Posted by iradex View Post
Hey Zagrei, im trying to put SetBackdrop on target frame, i'm putting the code after the player frame code, i changed the frame name, but when i reload, al the screen is a bit dark, the target frame is correct, but all the screen is a bit dark, what i'm doing wrong?




\/ Agree with Led, i'm newb too, and it's look awesome the effect!!!!
For the frame name, it's actually just 'f'. I should have been more clear: the frame's name isn't just what you see ingame, it's what is in the LUA. If you scroll up a bit more in bars.lua, you'll see all of this:

Code:
	local function CreateBar(unit, uf, name, db)  -- create status bars for health or power
		local f = uf[name]
		local ishp = (name == "hpbar")
		if db.hide then
			if f then 
				f:Hide()
				Stuf:RegisterElementRefresh(uf, name, (ishp and "healthelements") or "powerelements", nil)
			end
			return
		end
		if not f then
			f = Stuf:CreateBase(unit, uf, name, db)
			f.bg = f:CreateTexture(nil, "BACKGROUND")
			f.bg:SetAllPoints(f)
			f.barbase = CreateFrame("Frame", nil, uf)
			f.bar = f:CreateTexture(nil, "ARTWORK")
In short, that creates and styles the frames. So, by attaching the border/backdrop to 'f', you are attaching it to all StUF bars. This means that HP and Power bars have their own separate border and backdrop, so they can be moved around and resized at will REALLY nifty.

Does that help?
__________________
  Reply With Quote