Thread Tools Display Modes
05-26-10, 09:14 AM   #201
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
thanks Lordyfrb!
though, the mana regen, shows my MP5, with 14 decimals
does anyone know how to make it with no decimals?
  Reply With Quote
05-26-10, 09:23 AM   #202
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by zynix View Post
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.
  Reply With Quote
05-26-10, 09:32 AM   #203
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Katae View Post
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?

Last edited by zynix : 05-26-10 at 09:57 AM.
  Reply With Quote
06-19-10, 07:51 PM   #204
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
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 >.<
  Reply With Quote
06-19-10, 08:03 PM   #205
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Dokee View Post
bg_alpha = 0,5,
That should be 0.5, not 0,5

Good luck!
  Reply With Quote
06-19-10, 08:13 PM   #206
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
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
  Reply With Quote
06-20-10, 05:49 AM   #207
Fazer
A Kobold Labourer
Join Date: Mar 2006
Posts: 1
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
  Reply With Quote
06-20-10, 11:24 AM   #208
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Dokee View Post
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
  Reply With Quote
06-20-10, 01:30 PM   #209
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
Originally Posted by zynix View Post
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.
  Reply With Quote
06-20-10, 01:56 PM   #210
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Dokee View Post
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
  Reply With Quote
06-20-10, 03:05 PM   #211
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
Originally Posted by zynix View Post
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
  Reply With Quote
06-20-10, 04:11 PM   #212
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Dokee View Post
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.
  Reply With Quote
06-21-10, 12:08 PM   #213
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
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?
  Reply With Quote
06-22-10, 09:08 AM   #214
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Dokee View Post
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?
  Reply With Quote
06-22-10, 09:37 AM   #215
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
Originally Posted by zynix View Post
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
  Reply With Quote
06-22-10, 12:53 PM   #216
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Dokee View Post
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
Allright, post the code you're trying to use, and i'll see what i can do
  Reply With Quote
06-22-10, 01:44 PM   #217
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
Originally Posted by zynix View Post
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,
	},
  Reply With Quote
06-22-10, 01:59 PM   #218
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
[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
  Reply With Quote
06-22-10, 02:33 PM   #219
Dokee
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 19
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.

Last edited by Dokee : 06-22-10 at 05:44 PM.
  Reply With Quote
06-23-10, 08:39 AM   #220
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Dokee View Post
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
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » LitePanels - An art framework

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