WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Released AddOns (https://www.wowinterface.com/forums/forumdisplay.php?f=9)
-   -   LitePanels - An art framework (https://www.wowinterface.com/forums/showthread.php?t=25283)

zynix 05-26-10 09:14 AM

thanks Lordyfrb!
though, the mana regen, shows my MP5, with 14 decimals ;)
does anyone know how to make it with no decimals? :)

Katae 05-26-10 09:23 AM

Quote:

Originally Posted by zynix (Post 189588)
thanks Lordyfrb!
though, the mana regen, shows my MP5, with 14 decimals ;)
does anyone know how to make it with no decimals? :)

Take "%s mp5" and replace it with "%.0f mp5". The zero in %.0f being the number of decimal places in the float.

zynix 05-26-10 09:32 AM

Quote:

Originally Posted by Katae (Post 189592)
Take "%s mp5" and replace it with "%.0f mp5". The zero in %.0f being the number of decimal places in the float.

Thanks! works like a charm :)

may have another question later this evening, cant really work much on the code atm - Stay tuned!

allright, searched the WoW API, and i cannot find a way to get the display to show Agility, attackpower, and critchance.
any chance you might help? ;)

Dokee 06-19-10 07:51 PM

Just found about this awesome looking addon, so I went and tried the first tutorial but end up with errors or nothing at all no matter what I do.

This is how my script currently looks like:
Code:

lpanels:CreateLayout("TestCake", { name = "BlackBar",
anchor_to = "BOTTOM",
y_off = 20,
width = "100%",
height = 50,
bg_color = "0 0 0",
bg_alpha = 0,5,
}, { bottom = 20, top = 20 } -- Optional viewport config
)

lpanels:ApplyLayout("n:khantos r:darksorrow", "TestCake", "AnotherLayout")

The error I get looks like this:
Code:

Message: Interface\AddOns\LitePanels\core.lua:328: attempt to index local 'f' (a number value)
Time: 06/20/10 03:35:36
Count: 1
Stack: Interface\AddOns\LitePanels\core.lua:328: in function `Init'
Interface\AddOns\LitePanels\core.lua:364: in function <Interface\AddOns\LitePanels\core.lua:354>

Locals: self = <table> {
 Exit = <function> defined @Interface\AddOns\LitePanels\core.lua:348
 defaults = <table> {
 }
 media = "Interface\AddOns\LitePanels\media\"
 ApplyLayout = <function> defined @Interface\AddOns\LitePanels\core.lua:86
 CreateFrame = <function> defined @Interface\AddOns\LitePanels\core.lua:373
 MakePanel = <function> defined @Interface\AddOns\LitePanels\core.lua:122
 Init = <function> defined @Interface\AddOns\LitePanels\core.lua:323
 RegisterEvent = <function> defined @Interface\AddOns\LitePanels\core.lua:106
 OnEvent = <function> defined @Interface\AddOns\LitePanels\core.lua:354
 profile = <table> {
 }
 MatchProf = <function> defined @Interface\AddOns\LitePanels\core.lua:77
 events = <table> {
 }
 cinfo = <table> {
 }
 defaultv = <table> {
 }
 temp = <table> {
 }
 sides = <table> {
 }
 CreateLayout = <function> defined @Interface\AddOns\LitePanels\core.lua:61
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = 5
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
 16 = <table> {
 }
 17 = <table> {
 }
 18 = <table> {
 }
 19 = <table> {
 }
 20 = <table> {
 }
 vp = <table> {
 }
 Chat Background = <table> {
 }
 Simple Viewport = <table> {
 }
}
(for control) = 1
i = 1
f = 5
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = 5
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
 16 = <table> {
 }
 17 = <table> {
 }
 18 = <table> {
 }
 19 = <table> {
 }
 20 = <table> {
 }
 vp = <table> {
 }
 Chat Background = <table> {
 }
 Simple Viewport = <table> {
 }
}
(for control) = 1
_ = 1
p = 5
(*temporary) = 0
(*temporary) = 1
(*temporary) = "attempt to index local 'f' (a number value)"
ipairs = <function> defined =[C]:-1
is = <function> defined @Interface\AddOns\LitePanels\core.lua:44

Any idea what I'm doing wrong? Tried the AFK and Stat script you posted too, and they worked completely fine. The viewport config works as well but only without the black bar layout. As a newbie to scripting this seriously confuses me >.<

Katae 06-19-10 08:03 PM

Quote:

Originally Posted by Dokee (Post 192874)
bg_alpha = 0,5,

That should be 0.5, not 0,5

Good luck!

Dokee 06-19-10 08:13 PM

Errors are gone now, but I don't get anything on screen now lol.
Guess I'll just fool around a little more and see if something else works

Fazer 06-20-10 05:49 AM

Hi,

Like instead bg_color = "CLASS" use bg_color = "POWER / MANA"
I just need to paint the panel in the color of mana / rage / energy

Thx

zynix 06-20-10 11:24 AM

Quote:

Originally Posted by Dokee (Post 192878)
Errors are gone now, but I don't get anything on screen now lol.
Guess I'll just fool around a little more and see if something else works

Fixed it :)

Code:

lpanels:CreateLayout("TestCake", {
{        name = "BlackBar",
        anchor_to = "BOTTOM",
        y_off = 20,
        width = "100%",
        height = 50,
        bg_color = "0 0 0",
        bg_alpha = 0.5,
},
})lpanels:ApplyLayout(nil, "TestCake")

You missed a { } around "all" your panels :)
didnt get the viewport thing to work though :P

Dokee 06-20-10 01:30 PM

Quote:

Originally Posted by zynix (Post 192911)
Fixed it :)

Code:

lpanels:CreateLayout("TestCake", {
{        name = "BlackBar",
        anchor_to = "BOTTOM",
        y_off = 20,
        width = "100%",
        height = 50,
        bg_color = "0 0 0",
        bg_alpha = 0.5,
},
})lpanels:ApplyLayout(nil, "TestCake")

You missed a { } around "all" your panels :)
didnt get the viewport thing to work though :P

Ah, cheers. Thanks for the help though I dropped that and just started messing about and I finally got the hang of it now. Really loving this addon!
(My new UI is starting to look good!)

Just one quick question though. How easy is oUF scripting compared to this? With a premade layout to work from.

zynix 06-20-10 01:56 PM

Quote:

Originally Posted by Dokee (Post 192920)
Ah, cheers. Thanks for the help though I dropped that and just started messing about and I finally got the hang of it now. Really loving this addon!
(My new UI is starting to look good!)

Just one quick question though. How easy is oUF scripting compared to this? With a premade layout to work from.

I don't know about that one, sorry.
Though, i'm eager to try it out myself :)

EDIT: looked through some code in a oUF layout, i'd say this is much more simple, but i think that once you get the hang of it, it'll be just as easy :)

Dokee 06-20-10 03:05 PM

Quote:

Originally Posted by zynix (Post 192924)
I don't know about that one, sorry.
Though, i'm eager to try it out myself :)

EDIT: looked through some code in a oUF layout, i'd say this is much more simple, but i think that once you get the hang of it, it'll be just as easy :)

Sounds allright, might try it out in the upcoming days if I'm not happy with the UF's I'm using on my current UI project.

Always hated some of the restrictions in-game configurable addons had. But never really got myself into oUF or other similiar addons. Guess it's about time for me to get into this stuff. Considering I've been doing interface projects since early vanilla :p

Katae 06-20-10 04:11 PM

Quote:

Originally Posted by Dokee (Post 192920)
Ah, cheers. Thanks for the help though I dropped that and just started messing about and I finally got the hang of it now. Really loving this addon!
(My new UI is starting to look good!)

Just one quick question though. How easy is oUF scripting compared to this? With a premade layout to work from.

I could be wrong, but I don't believe that oUF has a "frame making" functionality built-in, you'd have to make them from scratch (which isn't too hard itself, just not as approachable). I gave (almost) everything a simple API so frames and their attached scripts are easier to write and manage.

By the way: lpanels:CreateLayout({ { panel }, { panel } }, { viewport });

Yeah... A little confusing at first, the syntax isn't too hard to get a hang of though.

Dokee 06-21-10 12:08 PM

Another question.
I want a panel to hide when I don't have a target, and show when I have one. I've tried some different things but none seemed to work.
I'm currently using Stuf Unit Frames. Want to use this on the Target, ToT and Pet frames.
Tried parenting it, but i didn't get it to work.
Any ideas?

zynix 06-22-10 09:08 AM

Quote:

Originally Posted by Dokee (Post 193046)
Another question.
I want a panel to hide when I don't have a target, and show when I have one. I've tried some different things but none seemed to work.
I'm currently using Stuf Unit Frames. Want to use this on the Target, ToT and Pet frames.
Tried parenting it, but i didn't get it to work.
Any ideas?


Is it a panel to make a background for the frame, or?

Dokee 06-22-10 09:37 AM

Quote:

Originally Posted by zynix (Post 193156)
Is it a panel to make a background for the frame, or?

It's basically just a stripe on the left and right side of the frame to make it look nicer. No background, it's more of an extension of the border frame. Or something :p

zynix 06-22-10 12:53 PM

Quote:

Originally Posted by Dokee (Post 193159)
It's basically just a stripe on the left and right side of the frame to make it look nicer. No background, it's more of an extension of the border frame. Or something :p

Allright, post the code you're trying to use, and i'll see what i can do :)

Dokee 06-22-10 01:44 PM

Quote:

Originally Posted by zynix (Post 193189)
Allright, post the code you're trying to use, and i'll see what i can do :)

Well.. thats some of the problem, I have no idea what code(s) to use. But I could give you the stripe code for LitePanels if that helps? So basically I just have two of these on each side of all unit frames, and want them hidden when the frames are not shown. (Target, Pet, Target of Target and possibly Party)
Code:

{        name = "LeftPlayerTop", parent = "UIParent", anchor_to = "BOTTOM",
                width = 75, height = 2,
                strata = "LOW",
                bg_color = "0 1 1", bg_alpha = 0, gradient = "H", gradient_color = "0 1 1", gradient_alpha = 1,
                y_off = 177.5, x_off = -465,
        },


zynix 06-22-10 01:59 PM

[quote=Dokee;193197]Well.. thats some of the problem, I have no idea what code(s) to use. But I could give you the stripe code for LitePanels if that helps? So basically I just have two of these on each side of all unit frames, and want them hidden when the frames are not shown. (Target, Pet, Target of Target and possibly Party)

Allright, this should fix it:
Code:

        {        name = "LeftPlayerTop",
                parent = "Stuf.Units.Player",
                anchor_to = "TOP",
                width = 75,
                height = 2,
                strata = "LOW",
                bg_color = "0 1 1",
                bg_alpha = 0,
                gradient = "H",
                gradient_color = "0 1 1",
                gradient_alpha = 1,
        },
        {        name = "LeftPlayerBottom",
                parent = "Stuf.Units.Player",
                anchor_to = "BOTTOM",
                width = 75,
                height = 2,
                strata = "LOW",
                bg_color = "0 1 1",
                bg_alpha = 0,
                gradient = "H",
                gradient_color = "0 1 1",
                gradient_alpha = 1,
        },

just add a different name for each panel, and change the parent to the frame you want to attach it to, IE:
Stuf.Units.Target for the target
Stuf.Units.Targettarget for ToT
Stuf.Units.Pet for pet
Stuf.Units.Party1 for first party member
Stuf.Units.Party2 for second, and so on.


Remember, always start with a capital letter, in Stuf parents :)

Dokee 06-22-10 02:33 PM

Hmm.. it's not working, weird. I get no errors or anything but the frame never shows up now. I'll try with some variations and see if I can come out with anything. Do you have any more ideas?
Thanks a bunch for the help btw!

EDIT: Found a much better-looking way, instead of using LitePanels to just add the transparency as a decoration I made fading status bars instead, much more functional for Unit Frame usage. But thanks for the effort in helping me.

zynix 06-23-10 08:39 AM

Quote:

Originally Posted by Dokee (Post 193209)
Hmm.. it's not working, weird. I get no errors or anything but the frame never shows up now. I'll try with some variations and see if I can come out with anything. Do you have any more ideas?
Thanks a bunch for the help btw!

EDIT: Found a much better-looking way, instead of using LitePanels to just add the transparency as a decoration I made fading status bars instead, much more functional for Unit Frame usage. But thanks for the effort in helping me.


Thank you :)
Sorry it didn't work out though


All times are GMT -6. The time now is 10:48 AM.

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