WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   @Led: Stuf question (https://www.wowinterface.com/forums/showthread.php?t=36715)

Zagrei 11-12-10 05:31 PM

@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 :o 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

Blinky12 11-12-10 05:54 PM

Quote:

Originally Posted by Zagrei (Post 217552)
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 :o 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.

Zagrei 11-12-10 06:10 PM

Quote:

Originally Posted by Blinky12 (Post 217554)
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 :)

Blinky12 11-12-10 06:37 PM

Quote:

Originally Posted by Zagrei (Post 217555)
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.

Zagrei 11-12-10 07:00 PM

Quote:

Originally Posted by Blinky12 (Post 217559)
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.

iradex 11-12-10 07:35 PM

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?

Taryble 11-13-10 10:43 AM

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. :-)

Zagrei 11-13-10 01:02 PM

Quote:

Originally Posted by iradex (Post 217567)
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 :)

iradex 11-13-10 01:20 PM

Quote:

Originally Posted by Zagrei (Post 217630)
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.. ?

Zagrei 11-13-10 03:51 PM

Quote:

Originally Posted by iradex (Post 217633)
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!

iradex 11-13-10 05:17 PM

I love you!!!! :banana:

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!!

Unkn 11-13-10 06:07 PM

Quote:

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. :)

Zagrei 11-13-10 07:51 PM

Quote:

Originally Posted by Unkn (Post 217666)
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 :D

iradex 11-14-10 06:37 AM

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!!!!

Led ++ 11-14-10 07:25 AM

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?

Zagrei 11-14-10 01:01 PM

Quote:

Originally Posted by Led ++ (Post 217713)
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.

Zagrei 11-14-10 01:06 PM

Quote:

Originally Posted by iradex (Post 217710)
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 :D REALLY nifty.

Does that help?

iradex 11-14-10 01:27 PM

It helped :D Worked! Btw, i tried to do the effect that Led want, and when i reload, my bar still all black.

Zagrei 11-14-10 01:46 PM

Quote:

Originally Posted by iradex (Post 217746)
It helped :D 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 :)

iradex 11-14-10 02:06 PM

Now working!!! Really thanks Zagrei, you're just pr0 :D

Zagrei 11-14-10 02:30 PM

Quote:

Originally Posted by iradex (Post 217756)
Now working!!! Really thanks Zagrei, you're just pr0 :D

You're quite welcome! I do what I can ;)

Zagrei 11-14-10 06:02 PM

Led, I wanna see a screenie once you have it implemented into your UI! I'm sure you'll find a REALLY nice way to use it ;)

Porsha 11-14-10 06:27 PM

OK, I have gone nuts adding your SetBackDrop thingy to a couple of addons but for the life of me I cant figure out Dominos or CoolLine ><

I put it in and sometimes my whole screen goes black lol

Any pointers? Like is there a keyword you search for in each file to find where to put the SetBackDrop call? I tried searching for "border", "backdrop", "edgefile" but no luck really on it...thanks again. This is awesome!

Zagrei 11-14-10 06:43 PM

Quote:

Originally Posted by Porsha (Post 217781)
OK, I have gone nuts adding your SetBackDrop thingy to a couple of addons but for the life of me I cant figure out Dominos or CoolLine ><

I put it in and sometimes my whole screen goes black lol

Any pointers? Like is there a keyword you search for in each file to find where to put the SetBackDrop call? I tried searching for "border", "backdrop", "edgefile" but no luck really on it...thanks again. This is awesome!

For Dominos, I haven't figured it out yet either, LOL. What *I* personally did was this:
Code:

local bottompanel = CreateFrame("Frame", nil, UIParent)
bottompanel:SetFrameStrata("BACKGROUND")
bottompanel:SetWidth(191)
bottompanel:SetHeight(45)
bottompanel:SetPoint("BOTTOM", UIParent, "BOTTOM", 1, 77)
bottompanel:SetBackdrop({
        bgFile = 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga',
        edgeFile = 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga',
        edgeSize = 1,
        insets = {left = 1, right = 1, top = 1, bottom = 1}
})
bottompanel:SetBackdropColor(0, 0, 0, .4)
bottompanel:SetBackdropBorderColor(0, 0, 0)

Yep, I just made a panel and placed it behind my actionbars :P I just made a random LUA file in my personal addon, added it to the TOC, and started the game up. It took some time to get the h/w and positioning right, but it's done now :) As for CoolLine, I'll have to take a look, I'll get back to you :)

Oraknathal 11-14-10 06:52 PM

can you get a transparent health defecit?? and a class colored hp/power bar?? i dont want the class colored health defecit.im just not use to it.
if I were to just want the transparent backround how would i do this??

Zagrei 11-14-10 07:02 PM

1 Attachment(s)
Quote:

Originally Posted by Oraknathal (Post 217788)
can you get a transparent health defecit?? and a class colored hp/power bar?? i dont want the class colored health defecit.im just not use to it.
if I were to just want the transparent backround how would i do this??

Then just make the backdrop opacity in StUF 0% and the bar opacity 100%. Done :)

>Porsha: Attached is a picture of CoolLine with the style coded in, and a monochromeoutline added to the font. Click HERE to see the new core.lua, as it is easier than telling you the changes :P

Zagrei 11-14-10 07:06 PM

Let me throw this out there, as well:

I'm not gonna ask you to give credit to use this in a UI :P If you want to mention me or not, it's fine. Just know that it's not like a copyrighted idea, or anything xD

Oraknathal 11-14-10 07:42 PM

Quote:

Originally Posted by Zagrei (Post 217648)
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!

I tried it but still having trouble when u said replace the red f's with frame name it confused. im sorry but im not that good at lua.
but could you give me an example of what you mean by the name instead of the f such as the player frame.

Unkn 11-14-10 07:42 PM

2 Attachment(s)
Concerning Dominos Background Panels....

You can parent a panel to an action button with Dominos, and size/position it around that button.

For example I use LitePanels and the following is what I do for my pet action bar, which isn't always there, so I don't want a panel showing all the time.

Code:

{    name = "PetBox", parent = "PetActionButton1",
        anchor_to = "LEFT", anchor_from = "RIGHT", y_off = 0, x_off = -40,
        width = "1520%", height = "150%",
        bg_alpha = 1, gradient_color = {.1,.1,.1},
        gradient = "V", bg_color = {0,0,0}, gradient_alpha = 1, level = 0,
        border = "SOLID", border_size = 1, border_color = {.15,.15,.15}, border_alpha = .75, inset = -2,
},

Yes the code is just for LitePanels, but I am just showing it can be done.

I just parent panels to specific buttons instead of the actionbar itself, and scale it up.

Zagrei 11-14-10 08:00 PM

Quote:

Originally Posted by Oraknathal (Post 217795)
I tried it but still having trouble when u said replace the red f's with frame name it confused. im sorry but im not that good at lua.
but could you give me an example of what you mean by the name instead of the f such as the player frame.

Read THIS post :)

Porsha 11-14-10 08:11 PM

Sweet! I think I understand how its done now! This is SO much easier and cleaner to use when you understand it all :)

thanks a ton!

Zagrei 11-14-10 08:34 PM

No problem, Porsha :D Have fun!

Oraknathal 11-14-10 09:00 PM

it worked and it looks amazing i just have 1 question.
how do i get a 1 pixel bordr like yours around it. is it a panel or is it in the stuf config?

Zagrei 11-14-10 09:22 PM

Quote:

Originally Posted by Oraknathal (Post 217810)
it worked and it looks amazing i just have 1 question.
how do i get a 1 pixel bordr like yours around it. is it a panel or is it in the stuf config?

The code I gave you is what I use in StUF, and it gives the 1px border. Did you edit the code at all? If you did, you may have accidentally deleted something pertaining to the border.

Oraknathal 11-14-10 09:25 PM

Quote:

Originally Posted by Zagrei (Post 217811)
The code I gave you is what I use in StUF, and it gives the 1px border. Did you edit the code at all? If you did, you may have accidentally deleted something pertaining to the border.

i didnt edit it. should i redo it?? just to make sure?

Zagrei 11-14-10 09:33 PM

Quote:

Originally Posted by Oraknathal (Post 217812)
i didnt edit it. should i redo it?? just to make sure?

Sure, it can't hurt :) Let me know if that fixes it. Also, make sure that the 'Bar Inset' options inside of the Health/Power menus are all set to '0'.

Led ++ 11-15-10 05:13 AM

Hej Zagrei, got it working for Stuf. Did you already find how to do it in Stuf_raid? Would be awesome.

iradex 11-15-10 08:47 AM

Quote:

Originally Posted by Unkn (Post 217796)
Concerning Dominos Background Panels....

You can parent a panel to an action button with Dominos, and size/position it around that button.

For example I use LitePanels and the following is what I do for my pet action bar, which isn't always there, so I don't want a panel showing all the time.

Code:

{    name = "PetBox", parent = "PetActionButton1",
        anchor_to = "LEFT", anchor_from = "RIGHT", y_off = 0, x_off = -40,
        width = "1520%", height = "150%",
        bg_alpha = 1, gradient_color = {.1,.1,.1},
        gradient = "V", bg_color = {0,0,0}, gradient_alpha = 1, level = 0,
        border = "SOLID", border_size = 1, border_color = {.15,.15,.15}, border_alpha = .75, inset = -2,
},

Yes the code is just for LitePanels, but I am just showing it can be done.

I just parent panels to specific buttons instead of the actionbar itself, and scale it up.


I'm keep getting this error
Code:

Message: Interface\AddOns\LitePanels\layout.lua:284: unexpected symbol near '{'
Time: 11/15/10 12:46:56
Count: 1
Stack:
Locals:

I tried to clean all the code, but i keep getting this :(

Zagrei 11-15-10 09:40 PM

1 Attachment(s)
Led: The problem with StUF_Raid at the moment is that, so far, the code makes there be 5 boxes where the 1st player of each raid-group would be, even when I am out of a raid. An older picture of this UI is attached, to show what I mean.

I don't know if it causes a problem in-raid or not, my raid nights are on Thursdays/Fridays :P

As for right now, I have that addon just turned off until I figure out how to make it work :) I'll let you know!

Zagrei 11-15-10 10:51 PM

I got it! :D Post this at around line 385 in StufRaid's raid.lua:
Code:

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

Ta-daaaa! ALL DONE! Have fun, and post screenshots here once you have your layout finished, I wanna see everyone's work :D



EDIT: It's raid.lua, not core.lua. D'OH! Sorry about that >.<

Oraknathal 11-15-10 11:04 PM

first of all tyvm zagrei for the help with the lua. my UI looks amazing. I will credit you very graciously with my post of the current ui.

btw what does that code for the stufraid do?

Oraknathal 11-15-10 11:06 PM

and I am sorry to ask but an what line would I input the code for Acb castbar?

Unkn 11-15-10 11:32 PM

Quote:

Originally Posted by iradex (Post 217880)
I'm keep getting this error
Code:

Message: Interface\AddOns\LitePanels\layout.lua:284: unexpected symbol near '{'
Time: 11/15/10 12:46:56
Count: 1
Stack:
Locals:

I tried to clean all the code, but i keep getting this :(

I was just posting to show you can parent to Dominos Buttons instead of the bars themselves. You'd have to adapt the parenting to whatever you are using.
For litepanels, you can literall drop that entire snippet of code into a layout you currently use and it will work for the pet bar, assuming you adjust the padding.

Zagrei 11-15-10 11:32 PM

Quote:

Originally Posted by Oraknathal (Post 217971)
first of all tyvm zagrei for the help with the lua. my UI looks amazing. I will credit you very graciously with my post of the current ui.

btw what does that code for the stufraid do?

Thank you! :D THe code styles StufRaid in the same style as the normal UFs

Quote:

Originally Posted by Oraknathal (Post 217972)
and I am sorry to ask but an what line would I input the code for Acb castbar?

Input this code around line 301 in the acb_Castbar\core.lua:
Code:

local bg = CreateFrame("Frame", nil, bar)
bg:SetBackdrop({
        bgFile = 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga',
        edgeFile = 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga',
        edgeSize = 1,
})
bg:SetBackdropColor(0, 0, 0, .4)
bg:SetBackdropBorderColor(0, 0, 0)
bg:SetFrameStrata("BACKGROUND")
bg:SetPoint("TOPLEFT", bar, -1, 1)
bg:SetPoint("BOTTOMRIGHT", bar, 1, -1)


Oraknathal 11-16-10 12:51 AM

I did what you said for both acb and stuf raid but now i cant use the castbar.and the raid frames dont show?

Zagrei 11-16-10 12:53 AM

Quote:

Originally Posted by Oraknathal (Post 217985)
I did what you said for both acb and stuf raid but now i cant use the castbar.and the raid frames dont show?

Make sure the opacities for both ACB and Stuf Raid are set correctly. As in, the backdrops are 0% opacity and hte bar is 100%, or visa versa. Lemme know if that helps

Oraknathal 11-16-10 01:08 AM

Quote:

Originally Posted by Zagrei (Post 217987)
Make sure the opacities for both ACB and Stuf Raid are set correctly. As in, the backdrops are 0% opacity and hte bar is 100%, or visa versa. Lemme know if that helps

know i mean i cant configure acb at all it wont open ingame

Zagrei 11-16-10 01:39 AM

Quote:

Originally Posted by Oraknathal (Post 217990)
know i mean i cant configure acb at all it wont open ingame

Make sure you aren't putting it in the AzCastBar\core.lua. It has to go into the acb_CastBar\core.lua. Biiig difference :P

Oraknathal 11-16-10 09:56 PM

Quote:

Originally Posted by Zagrei (Post 217992)
Make sure you aren't putting it in the AzCastBar\core.lua. It has to go into the acb_CastBar\core.lua. Biiig difference :P

this is the lua in acb_castbat/core.lua

self.safezone:Hide();
end
end
local bg = CreateFrame("Frame", nil, bar)
bg:SetBackdrop({
bgFile = 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga',
edgeFile = 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga',
edgeSize = 1,
})
bg:SetBackdropColor(0, 0, 0, .4)
bg:SetBackdropBorderColor(0, 0, 0)
bg:SetFrameStrata("BACKGROUND")
bg:SetPoint("TOPLEFT", bar, -1, 1)
bg:SetPoint("BOTTOMRIGHT", bar, 1, -1)

-- Initialise Each Bar
local bars = { "Player", "Target", "Focus", "Pet" };
local lastBar;
for _, token in ipairs(bars) do
local bar = AzCastBar.CreateMainBar("Frame",token,extraOptions);
bar.unit = token:lower();

whats wrong with it?
because I cant even configure it atm.

Zagrei 11-16-10 10:07 PM

Honestly, I don't know why your line numbers are different than mine, maybe different versions. The code should look like this instead:
Code:

-- Initialise Each Bar
local bars = { "Player", "Target", "Focus", "Pet" };
local lastBar;
for _, token in ipairs(bars) do
        local bar = AzCastBar.CreateMainBar("Frame",token,extraOptions);
        bar.unit = token:lower();
       
      local bg = CreateFrame("Frame", nil, bar)
        bg:SetBackdrop({
                        bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
                        edgeFile = 'Interface\\ChatFrame\\ChatFrameBackground',
                        edgeSize = 1,
                })
        bg:SetBackdropColor(0, 0, 0, .4)
        bg:SetBackdropBorderColor(0, 0, 0)
        bg:SetFrameStrata("BACKGROUND")
        bg:SetPoint("TOPLEFT", bar, -1, 1)
        bg:SetPoint("BOTTOMRIGHT", bar, 1, -1)

       
        -- Anchor
        bar:ClearAllPoints();
        if (lastBar) then
                bar:SetPoint("TOP",lastBar,"BOTTOM",0,-8);


The reason why your previous placement wasn't working was because 'bar' had not been created yet, and so when the code was asked to run it, it had no clue what 'bar' meant. It then aborted the script, and then your addon wasn't working. Ta-daa!

EDIT: Also, I was using 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga' for my blank texture, instead of the universal one 'Interface\\ChatFrame\\ChatFrameBackground'. That sure didn't help the problem :P

Oraknathal 11-16-10 11:43 PM

Quote:

Originally Posted by Zagrei (Post 218169)
Honestly, I don't know why your line numbers are different than mine, maybe different versions. The code should look like this instead:
Code:

-- Initialise Each Bar
local bars = { "Player", "Target", "Focus", "Pet" };
local lastBar;
for _, token in ipairs(bars) do
        local bar = AzCastBar.CreateMainBar("Frame",token,extraOptions);
        bar.unit = token:lower();
       
      local bg = CreateFrame("Frame", nil, bar)
        bg:SetBackdrop({
                        bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
                        edgeFile = 'Interface\\ChatFrame\\ChatFrameBackground',
                        edgeSize = 1,
                })
        bg:SetBackdropColor(0, 0, 0, .4)
        bg:SetBackdropBorderColor(0, 0, 0)
        bg:SetFrameStrata("BACKGROUND")
        bg:SetPoint("TOPLEFT", bar, -1, 1)
        bg:SetPoint("BOTTOMRIGHT", bar, 1, -1)

       
        -- Anchor
        bar:ClearAllPoints();
        if (lastBar) then
                bar:SetPoint("TOP",lastBar,"BOTTOM",0,-8);


The reason why your previous placement wasn't working was because 'bar' had not been created yet, and so when the code was asked to run it, it had no clue what 'bar' meant. It then aborted the script, and then your addon wasn't working. Ta-daa!

EDIT: Also, I was using 'Interface\\AddOns\\TinyDPS\\Textures\\blank.tga' for my blank texture, instead of the universal one 'Interface\\ChatFrame\\ChatFrameBackground'. That sure didn't help the problem :P

so what exactly would i do know to fix the problem?

Oraknathal 11-17-10 12:06 AM

Quote:

Originally Posted by Oraknathal (Post 218174)
so what exactly would i do know to fix the problem?

oh man my fault i had old version of acb castbar. soz man
i worked and looks so cool although whn im in edit mode it doesnt show thw background that is transparent. doesnt matter though.
tyvm.

Oraknathal 11-17-10 12:19 AM

although im still having problems with stuf i wont load the raid frames anymore. ive set the backrop to 0% and bar 100%

this is in stuf_raid/raid.

local function UpdateAttribute(this, name, value)
if name ~= "unit" then return end
if value then
units[value] = this
this.unit = value
UpdateUnit(value, this)
else
for u, uf in pairs(units) do
if uf == this then
units[u] = nil
end
endlocal bg = CreateFrame("Frame", nil, uf)
bg:SetBackdrop({
bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
edgeFile = 'Interface\\ChatFrame\\ChatFrameBackground',
edgeSize = 1,
})
bg:SetBackdropColor(0, 0, 0, .4)
bg:SetBackdropBorderColor(0, 0, 0)
bg:SetFrameStrata("BACKGROUND")
bg:SetPoint("TOPLEFT", uf, -1, 1)
bg:SetPoint("BOTTOMRIGHT", uf, 1, -1)
end
end.

Led ++ 11-17-10 04:26 AM

Hej Zag, I got the raidframes working but I have a tiny problem. It seems the out of range fading etc doesn't work anymore. But I neeeeeeedz it. :(

Zagrei 11-17-10 06:45 AM

Quote:

Originally Posted by Oraknathal (Post 218176)
although im still having problems with stuf i wont load the raid frames anymore. ive set the backrop to 0% and bar 100%

this is in stuf_raid/raid.

local function UpdateAttribute(this, name, value)
if name ~= "unit" then return end
if value then
units[value] = this
this.unit = value
UpdateUnit(value, this)
else
for u, uf in pairs(units) do
if uf == this then
units[u] = nil
end
endlocal bg = CreateFrame("Frame", nil, uf)
bg:SetBackdrop({
bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
edgeFile = 'Interface\\ChatFrame\\ChatFrameBackground',
edgeSize = 1,
})
bg:SetBackdropColor(0, 0, 0, .4)
bg:SetBackdropBorderColor(0, 0, 0)
bg:SetFrameStrata("BACKGROUND")
bg:SetPoint("TOPLEFT", uf, -1, 1)
bg:SetPoint("BOTTOMRIGHT", uf, 1, -1)
end
end.


First of all, the red line should be two lines, like:
Code:

end

local bg = CreateFrame("Frame", nil, uf)

Second of all, the code is in the wrong place. Probably different versions, again, but it should look like this:

Code:

        core.CreateIcon(uf, layout, "looticon", "Interface\\GroupFrame\\UI-Group-MasterLooter")
        core.CreateIcon(uf, layout, "leadericon", "Interface\\GroupFrame\\UI-Group-LeaderIcon")
        core.CreateIcon(uf, layout, "voiceicon", "Interface\\Common\\VoiceChat-Speaker")
        core.CreateIcon(uf, layout, "combaticon", "Interface\\CharacterFrame\\UI-StateIcon")

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

        if uf.unit then
                units[uf.unit] = uf
        end
end


Zagrei 11-17-10 06:47 AM

Quote:

Originally Posted by Led ++ (Post 218203)
Hej Zag, I got the raidframes working but I have a tiny problem. It seems the out of range fading etc doesn't work anymore. But I neeeeeeedz it. :(

It may be because you are hard-setting the alpha with that backdrop command. Try changing this line
Code:

bg:SetBackdropColor(0, 0, 0, .4)
to this
Code:

bg:SetBackdropColor(0, 0, 0, 1)
and then find a way to make the opacity look the same through the StufRaid options panel. I personally don't use range fading, which is why I didn't notice :P

Led ++ 11-17-10 07:48 AM

Quote:

Originally Posted by Zagrei (Post 218219)
It may be because you are hard-setting the alpha with that backdrop command. Try changing this line
Code:

bg:SetBackdropColor(0, 0, 0, .4)
to this
Code:

bg:SetBackdropColor(0, 0, 0, 1)
and then find a way to make the opacity look the same through the StufRaid options panel. I personally don't use range fading, which is why I didn't notice :P

Nope if I do this I just end up with black boxes. :)

Zagrei 11-17-10 07:59 AM

Quote:

Originally Posted by Led ++ (Post 218227)
Nope if I do this I just end up with black boxes. :)

Hmm... I'm not sure, really. I could fiddle around with it later tonight (it's morning now), but I have alot going on today. I'll let you know if I think of anything, though! Hope we can figure it out :)

Led ++ 11-17-10 08:13 AM

Also it seems that in stufraid, the healthbar and powerbars don't get the automatic 1 px border. The frame does, but the healthbar and powerbar doesn't. While in normal Stuf they do.

Zagrei 11-17-10 08:20 AM

Quote:

Originally Posted by Led ++ (Post 218230)
Also it seems that in stufraid, the healthbar and powerbars don't get the automatic 1 px border. The frame does, but the healthbar and powerbar doesn't. While in normal Stuf they do.

That is because StufRaid handles the UF creation in a different way than Stuf UFs. The only way I found to style StufRaid was to style the frame, and not the individual bars, as that just didn't work at all xD Kinda sucks, though =/ I'll fiddle with it some more later, I might figure something else out :)


All times are GMT -6. The time now is 05:16 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI