Thread Tools Display Modes
11-12-10, 05:31 PM   #1
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
@Led: Stuf question

Led, last I checked you use StUF for your unitframes. However, I wasn't aware that StUF had a HP Deficit option... how did you do this? Wait... you probably just set the backdrop color to classcolored, and the statusbar to the black/dark color... d'oh :P

Now I just wish I could achieve an oUF_Nin effect with StUF Sadly, StUF's author isn't responding to me asking for the feature to be added :P It's in StUF_Raid, after all! I can't port it over, no matter how hard I try =/

/meaningless post
__________________

Last edited by Seerah : 11-12-10 at 08:20 PM. Reason: moved these here from screenshots thread
  Reply With Quote
11-12-10, 05:54 PM   #2
Blinky12
A Cliff Giant
 
Blinky12's Avatar
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 78
Originally Posted by Zagrei View Post
Led, last I checked you use StUF for your unitframes. However, I wasn't aware that StUF had a HP Deficit option... how did you do this? Wait... you probably just set the backdrop color to classcolored, and the statusbar to the black/dark color... d'oh :P

Now I just wish I could achieve an oUF_Nin effect with StUF Sadly, StUF's author isn't responding to me asking for the feature to be added :P It's in StUF_Raid, after all! I can't port it over, no matter how hard I try =/

/meaningless post
I think it does have a HP deficit option, if i remember correctly.
__________________
-Not Vanilla Gorilla-
  Reply With Quote
11-12-10, 06:10 PM   #3
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Originally Posted by Blinky12 View Post
I think it does have a HP deficit option, if i remember correctly.
In StUF_Raid, there is a "Fade on Loss" option. This option is mysteriously absent in the normal StUF unitframes. I use StUF exclusively, and I have looked literally everywhere :P I tried coding the option into StUF, but I never got further than getting the "Fade on Loss" check-box into the options panel; it didn't actually do anything. Oh well, I'll live with what I have for now
__________________
  Reply With Quote
11-12-10, 06:37 PM   #4
Blinky12
A Cliff Giant
 
Blinky12's Avatar
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 78
Originally Posted by Zagrei View Post
In StUF_Raid, there is a "Fade on Loss" option. This option is mysteriously absent in the normal StUF unitframes. I use StUF exclusively, and I have looked literally everywhere :P I tried coding the option into StUF, but I never got further than getting the "Fade on Loss" check-box into the options panel; it didn't actually do anything. Oh well, I'll live with what I have for now
I think if you tick something like "Health Gradient" it does it and you can change the colours using the general options.
__________________
-Not Vanilla Gorilla-
  Reply With Quote
11-12-10, 07:00 PM   #5
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Originally Posted by Blinky12 View Post
I think if you tick something like "Health Gradient" it does it and you can change the colours using the general options.
I should have been more clear: I meant coloring the HP bar for health deficit, and not for health that you already have. Led has a Classcolored HP deficit, which is ultimately what I would like to replicate in StUF, except with a transparent foreground with classcolored HP deficit, which at this moment, isn't available in StUF unit frames. It works in Stuf Raid, though.
__________________
  Reply With Quote
11-12-10, 07:35 PM   #6
iradex
A Cyclonian
Join Date: Nov 2009
Posts: 43
Im using Stuf, tried to create some nice Unitframes, but, where i can get nice borders, textures , like Led or Zagrei to use? And where i put them, so Stuf can read them?
  Reply With Quote
11-13-10, 10:43 AM   #7
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
Just search for "border" or "texture", there's several collections of statusbar and border textures on this site.

For how to get them into WoW, in your addons folder should be an addon named "SharedMedia". If you don't have it, download it now. Inside that addon's folder is a file called "Instructions for MyMedia.txt", all you have to do is follow the instructions in that file. :-)
__________________
-- Taryble
  Reply With Quote
11-13-10, 01:02 PM   #8
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
Im using Stuf, tried to create some nice Unitframes, but, where i can get nice borders, textures , like Led or Zagrei to use? And where i put them, so Stuf can read them?
I personally don't use the built-in border system in StUF for my borders, I add them to the bars through a SetBackdrop call via LUA. I can explain that if need be
__________________
  Reply With Quote
11-13-10, 01:20 PM   #9
iradex
A Cyclonian
Join Date: Nov 2009
Posts: 43
Originally Posted by Zagrei View Post
I personally don't use the built-in border system in StUF for my borders, I add them to the bars through a SetBackdrop call via LUA. I can explain that if need be
Would be awsome! I can do this SetBackdrop to other things, like nameplates, bag addons, etc.. ?
  Reply With Quote
11-13-10, 03:51 PM   #10
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
Would be awsome! I can do this SetBackdrop to other things, like nameplates, bag addons, etc.. ?
Pretty much. I use it for sThreatMeter, Headline, StUF, TinyDPS, iMinimap, my personal ExpBar addon, I made a backdrop for my actionbars, and probably a few other places as well.

FOR STUF:
Around line 200 of 'bars.lua', change this:
Code:
if db.fade and not f.barfade then
f.barfade = f:CreateTexture(nil, "BORDER")
end

-- five second rule mana tick
to this:
Code:
if db.fade and not f.barfade then
f.barfade = f:CreateTexture(nil, "BORDER")
end

local bg = CreateFrame("Frame", nil, f)
bg:SetBackdrop({
        bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
	edgeFile = 'Interface\\ChatFrame\\ChatFrameBackground',
	edgeSize = 1,
})
bg:SetBackdropColor(0, 0, 0, .4)
bg:SetBackdropBorderColor(0, 0, 0)
bg:SetFrameLevel(0)
bg:SetPoint("TOPLEFT", f, -1, 1)
bg:SetPoint("BOTTOMRIGHT", f, 1, -1)

-- five second rule mana tick

The ONLY difference, obviously, is the SetBackdrop call. What you do is this:

-You find the frame you want to put the backdrop on
-Find it's name (in this case, 'f')
-Insert the frame's name into the highlighted areas
-/reloadui ingame, and see if it worked! (LOL)

To clarify, the following code is what you use in all of the addons. Don't forget to change the frame names to match the frame you want to attach it to!

Code:
local bg = CreateFrame("Frame", nil, f)
bg:SetBackdrop({
        bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
	edgeFile = 'Interface\\ChatFrame\\ChatFrameBackground',
	edgeSize = 1,
})
bg:SetBackdropColor(0, 0, 0, .4)
bg:SetBackdropBorderColor(0, 0, 0)
bg:SetFrameLevel(0)
bg:SetPoint("TOPLEFT", f, -1, 1)
bg:SetPoint("BOTTOMRIGHT", f, 1, -1)
You may not always try the right frame the first time, but that just takes trial and error. You'll get the hang of it quickly Lemme know if you need more help/explanation!
__________________

Last edited by Zagrei : 11-13-10 at 03:54 PM.
  Reply With Quote
11-13-10, 05:17 PM   #11
iradex
A Cyclonian
Join Date: Nov 2009
Posts: 43
I love you!!!!

Its perfect, i tried and it worked, to discover the frame name, im using this command

Code:
/script ChatFrame1:AddMessage(GetMouseFocus():GetName())
Pretty nice! I just need to find now good textures Thanks for your time and help!!
  Reply With Quote
11-13-10, 06:07 PM   #12
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
I love you!!!!

Its perfect, i tried and it worked, to discover the frame name, im using this command

Code:
/script ChatFrame1:AddMessage(GetMouseFocus():GetName())
Pretty nice! I just need to find now good textures Thanks for your time and help!!
Try /fstack and mouseover any frame. You wont have to constantly hit enter and look at your chat window to find the frame name. You'll have a tooltip pop up that will show you the name of every frame you are currently mousing over. And it stays up till you turn it off again.

And yes I'm with the op here, I'd love to have a class colored health deficit with transparent health bar on the main frames of Stuf not only the raid frames. Right now I have a set up similar to Led, with dark grey healthbar and class colored background.

I'd love to know if anyone has figured out a way to make this happen with stuf.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
11-13-10, 07:51 PM   #13
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Originally Posted by Unkn View Post
I'd love to know if anyone has figured out a way to make this happen with stuf.
The newest version of StUF has that option built in now! YAY, the author heard my plea
__________________
  Reply With Quote
11-14-10, 06:37 AM   #14
iradex
A Cyclonian
Join Date: Nov 2009
Posts: 43
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!!!!

Last edited by iradex : 11-14-10 at 09:02 AM.
  Reply With Quote
11-14-10, 07:25 AM   #15
Led ++
A Frostmaul Preserver
 
Led ++'s Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 254
Wel lZAgrei I guess you already answered your own question so now it's my turn.


PLEEAAAAASSEEEEEEE tell me in DETAIL how you managed to get the ouf_nin look?!!?,8!!?,?!!!?! I NEEEEEEEEEED to have it ^^

I'm a total newb at lua so please, tell me step by step what I have to edit in the .lua to get the effect you have ^^

And does it work for raid frames too?
__________________
  Reply With Quote
11-14-10, 01:01 PM   #16
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Originally Posted by Led ++ View Post
Wel lZAgrei I guess you already answered your own question so now it's my turn.


PLEEAAAAASSEEEEEEE tell me in DETAIL how you managed to get the ouf_nin look?!!?,8!!?,?!!!?! I NEEEEEEEEEED to have it ^^

I'm a total newb at lua so please, tell me step by step what I have to edit in the .lua to get the effect you have ^^

And does it work for raid frames too?
All right, all right! Haha :P Scroll up a bit, and you'll see that I posted a guide for the LUA :P Once you have pasted that in, just check the "Fill on Loss" and "Reverse Direction" boxes, and set the backdrop opacity to 0%. THEN, set the statusbar color to class, and set its opacity to 100%. /reloadui, and it's done!

You know what, I'll make your life easy! Click HERE for my LUA post :P

P.S. In StUF's case, the frame's name IS 'f'. The code I posted is directly from my bars.lua file


As far as StUF_Raid goes, it USED to work perfectly. Now, I'm not too sure... I'll get back to you on that. You can test it yourself, too.
__________________
  Reply With Quote
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
11-14-10, 01:27 PM   #18
iradex
A Cyclonian
Join Date: Nov 2009
Posts: 43
It helped Worked! Btw, i tried to do the effect that Led want, and when i reload, my bar still all black.
  Reply With Quote
11-14-10, 01:46 PM   #19
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
It helped Worked! Btw, i tried to do the effect that Led want, and when i reload, my bar still all black.
So, you set the opacity of the backdrop to 0%, and the opacity of the bar to 100%? By the way, the options I'm referring to are the ones in Player/Target/Whatever>Heath/Power Bar. What you are trying to do is remove any color aside from the Deficit health. That way, it is all pretty and transparent, except for the health you are missing. Does that work? Also, did you leave
Code:
bg:SetBackdropColor(0, 0, 0, .4)
the same? The little .4 at the end is what sets the alpha, and the 0's are the color.

NOTE: The reason that you have to reload the UI after any changes is because when you enter config mode OR make a change to a statusbar, it layers a second transparent layer on top of the current one, making it darker. Eventually, after enough changes, it will just be solid black. Just fyi
__________________

Last edited by Zagrei : 11-14-10 at 01:48 PM.
  Reply With Quote
11-14-10, 02:06 PM   #20
iradex
A Cyclonian
Join Date: Nov 2009
Posts: 43
Now working!!! Really thanks Zagrei, you're just pr0
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » @Led: Stuf question

Thread Tools
Display Modes

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