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


All times are GMT -6. The time now is 11:59 AM.

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