Thread Tools Display Modes
06-23-10, 06:48 PM   #221
pRAISED
A Defias Bandit
Join Date: Dec 2009
Posts: 2
Hi all

http://s.wowinterface.com/preview/pvw31606.jpg
http://i.imgur.com/f00eS.jpg

I need this LUA code for my UI with Chinchilla !
I just newbye in LUA , i needed help for this ^^

Thx you !
  Reply With Quote
06-23-10, 06:54 PM   #222
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by pRAISED View Post
I need this LUA code for my UI with Chinchilla !
I just newbye in LUA , i needed help for this ^^
Here you go: http://pastebin.org/355453
  Reply With Quote
06-24-10, 05:09 AM   #223
pRAISED
A Defias Bandit
Join Date: Dec 2009
Posts: 2
Thx you very much

Sry for my bad englis , i'm from french ^^

EDIT : After putting in LUA code Lpanels> Core.LUA I is that the graphics system code, I likewise will not have the code for LUA lstat
(See: http://s.wowinterface.com/preview/pvw31606.jpg )

Thank you in advance.
pRAISED

Last edited by pRAISED : 06-24-10 at 05:28 AM.
  Reply With Quote
06-24-10, 05:59 PM   #224
Canities
A Wyrmkin Dreamwalker
Join Date: Oct 2007
Posts: 54
Panel height math

Hiya Katae,
Loving both LitePanels and LiteStats.
I do however have a query about making a panel that changes size with the chat frame. I'm using chicchai to change the height of the chat frame so i need to be able to do some math on the height, for example i need it to be 100% of the frame height + 35 for the chat tabs.
So far i have my panel coded as:
Code:
	{ name = "Bar10", 
		parent = "UIParent", anchor_frame = "ChatFrame1", 
		anchor_to = "BOTTOMLEFT", anchor_from = "BOTTOMLEFT", y_off = -10, x_off = -5,
		width = 350, height = "100%", -- this is where i need the math to change the height to be 100%+35
		gradient = "H", 
		bg_color = {0,0,0}, bg_alpha = 0.5,
		gradient_color = {0,0,0}, gradient_alpha = 0,
	},
Is there a quick and easy way of applying the math in the panel layout or do i have to do something a little more special?

Thanks for your assistance.

Cani
  Reply With Quote
06-25-10, 12:26 AM   #225
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Canities View Post
Hiya Katae,
Loving both LitePanels and LiteStats.
I do however have a query about making a panel that changes size with the chat frame. I'm using chicchai to change the height of the chat frame so i need to be able to do some math on the height, for example i need it to be 100% of the frame height + 35 for the chat tabs.
So far i have my panel coded as:
Code:
	{ name = "Bar10", 
		parent = "UIParent", anchor_frame = "ChatFrame1", 
		anchor_to = "BOTTOMLEFT", anchor_from = "BOTTOMLEFT", y_off = -10, x_off = -5,
		width = 350, height = "100%", -- this is where i need the math to change the height to be 100%+35
		gradient = "H", 
		bg_color = {0,0,0}, bg_alpha = 0.5,
		gradient_color = {0,0,0}, gradient_alpha = 0,
	},
Is there a quick and easy way of applying the math in the panel layout or do i have to do something a little more special?

Thanks for your assistance.

Cani
I'd try and make some panels for the chat tabs, and make them 35pix high
  Reply With Quote
06-25-10, 04:43 AM   #226
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
[quote=zynix;193202]
Originally Posted by Dokee View Post
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
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.
the reason it didn't work is the frame names that stuf uses, they should be in the following format:
Stuf.units.'framename'

i.e. for the pet frame its:
Stuf.units.pet

Notice the only capital letter is the S in Stuf, the rest is lower case.
  Reply With Quote
06-25-10, 07:51 AM   #227
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
[quote=Lordyfrb;194257]
Originally Posted by zynix View Post



the reason it didn't work is the frame names that stuf uses, they should be in the following format:
Stuf.units.'framename'

i.e. for the pet frame its:
Stuf.units.pet

Notice the only capital letter is the S in Stuf, the rest is lower case.

Ahh, my bad :P
  Reply With Quote
06-25-10, 01:10 PM   #228
haylie
A Scalebane Royal Guard
 
haylie's Avatar
Join Date: May 2009
Posts: 417
Originally Posted by Canities View Post
Hiya Katae,
Loving both LitePanels and LiteStats.
I do however have a query about making a panel that changes size with the chat frame. I'm using chicchai to change the height of the chat frame so i need to be able to do some math on the height, for example i need it to be 100% of the frame height + 35 for the chat tabs.
You need to set the parent to ChatFrame1, the height to "100%" (this will change your panel's height to always match the height of the thing you're parenting to, in this case the ChatFrame1). Then for the chat tabs, set the y offset of the panel to 35.

Code:
parent = "ChatFrame1",
height = "100%",
y_off = 35,
  Reply With Quote
06-25-10, 01:19 PM   #229
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar
Join Date: Dec 2006
Posts: 341
I was curious if someone had a litepanel or knewhow to set a panel to make the recount window hide when in a capital city (stormwind, dalaran, orgrimmar, etc.) and making a chatframe appear instead while in a capital city and of course making the chatframe disappear while out of a capital city and recount appear in its place.
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill
  Reply With Quote
06-25-10, 03:53 PM   #230
Canities
A Wyrmkin Dreamwalker
Join Date: Oct 2007
Posts: 54
Originally Posted by haylie View Post
You need to set the parent to ChatFrame1, the height to "100%" (this will change your panel's height to always match the height of the thing you're parenting to, in this case the ChatFrame1). Then for the chat tabs, set the y offset of the panel to 35.
Thanks for the reply haylie,
Only issue i have with that solution is the panel sits at the bottom of the chat frame and not 10pix below. I forgot to mention that i have another bar anchored to the bottom of the chat panel (see images below). Ended up opting for this solution:
Code:
	{ name = "Bar10", --Gen Chat Frame
		parent = "UIParent", anchor_frame = "ChatFrame1", 
		anchor_to = "BOTTOMLEFT", anchor_from = "BOTTOMLEFT", y_off = -10, x_off = -5,
		width = 350, height = "100%",
		gradient = "H", 
		bg_color = {0,0,0}, bg_alpha = 0.5,
		gradient_color = {0,0,0}, gradient_alpha = 0,
	},
	{ name = "BorderBottom", parent = "Bar10",
		anchor_to = "BOTTOM", 
		width = "100%", height = 1,
		bg_color = {0,0,0}, bg_alpha = 0.75,
	},
	{ name = "Bar11", --Gen Chat Tab
		parent = "Bar10", anchor_frame = "Bar10", 
		anchor_to = "BOTTOMLEFT", anchor_from = "TOPLEFT", y_off = 0, x_off = 0,
		width = 350, height = 35,
		gradient = "H", 
		bg_color = {0,0,0}, bg_alpha = 0.5,
		gradient_color = {0,0,0}, gradient_alpha = 0,
	},
	{ name = "BorderTop", parent = "Bar11",
		anchor_to = "TOP", 
		width = "100%", height = 1,
		bg_color = {0,0,0}, bg_alpha = 0.75,
	},
Works a treat with Chicchai and changes size respectivly.
Minimised:Maximised:

Cani
  Reply With Quote
06-25-10, 11:57 PM   #231
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar
Join Date: Dec 2006
Posts: 341
Ok so here is my stab in the dark at making recount disappear while in a capital city and for the life of me I can't figure it out at all, it doesn't seem to be working. Basically I ripped off a sample script from the kgpanel sample script help page area and have no idea why this isn't working so hopefully someone can give me some insight on what I am doing wrong, I am thinking I have the actual code in the wrong spot of my layout section but I don't know. This is a snippet from my layout file, I can post my file up as a download if needed too. Thanks in advance for any help you can give.

Code:
        -- Recount Panel
        {	name = "RecountPanel",
			anchor_to = "BOTTOMRIGHT",
			width = 400,
			height = 143,
			y_off = 5,
			x_off = -5,
			bg_color = {.01,.01,.01},
			bg_alpha = 1,
			strata = "BACKGROUND"
        },
        OnLoad = function(self)
            self:RegsiterEvent('CHAT_MSG_CHANNEL_NOTICE')
        end,

        OnEvent = function(self)
        if event == "CHAT_MSG_CHANNEL_NOTICE" then
        if arg1 == "YOU_JOINED" and arg7 == 2 then
            Recount_MainWindow:Hide()
        elseif arg1 == "YOU_LEFT" and arg7 == 2 then
            Recount_MainWindow:Show()
            end
        end
    end,
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill
  Reply With Quote
06-26-10, 08:55 AM   #232
haylie
A Scalebane Royal Guard
 
haylie's Avatar
Join Date: May 2009
Posts: 417
Are you getting any errors? I think your syntax for bg_color (line 8) should be:

Code:
bg_color = "0.01 0.01 0.01",
Edit: Also try this syntax for your script:

Code:
OnLoad=function(self)
            self:RegsiterEvent'CHAT_MSG_CHANNEL_NOTICE'
end,
OnEvent=function(self)
        if event == "CHAT_MSG_CHANNEL_NOTICE" then
        if arg1 == "YOU_JOINED" and arg7 == 2 then
            Recount_MainWindow:Hide()
        elseif arg1 == "YOU_LEFT" and arg7 == 2 then
            Recount_MainWindow:Show()
            end
        end
end,
You're also putting it in the wrong spot, it should be before the "}," at line 11.

You're also missing a comma after strata = "BACKGROUND"

Last edited by haylie : 06-26-10 at 09:00 AM.
  Reply With Quote
06-26-10, 09:38 AM   #233
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar
Join Date: Dec 2006
Posts: 341
No errors whatsoever, just not doing what I want it to going to try this once I get home from work tonight thanks alot for the help!
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill
  Reply With Quote
06-26-10, 08:59 PM   #234
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar
Join Date: Dec 2006
Posts: 341
Well tried this out and no go, I for the life of me can't figure out what I am doing wrong here, I tried changing a few things around but nothing seems to help. All my frames load properly except for the recount frame, the frame loads just without its border. Anyhow here is the error I am getting and my layout file to see if someone could make some sense of the mess I've made.

Code:
1x LitePanels-30300.2\layout.lua:78: attempt to call method 'RegsiterEvent' (a nil value)
LitePanels-30300.2\core.lua:295: in function `MakePanel'
LitePanels-30300.2\core.lua:345: in function `Init'
LitePanels-30300.2\core.lua:364: in function <LitePanels\core.lua:354>

Locals:
self = <table> {
 Exit = <function> @ LitePanels\core.lua:348:
 defaults = <table> {}
 media = "LitePanels\media\"
 ApplyLayout = <function> @ LitePanels\core.lua:86:
 CreateFrame = <function> @ LitePanels\core.lua:373:
 MakePanel = <function> @ LitePanels\core.lua:122:
 Init = <function> @ LitePanels\core.lua:323:
 RegisterEvent = <function> @ LitePanels\core.lua:106:
 OnEvent = <function> @ LitePanels\core.lua:354:
 profile = <table> {}
 MatchProf = <function> @ LitePanels\core.lua:77:
 events = <table> {}
 cinfo = <table> {}
 defaultv = <table> {}
 temp = <table> {}
 sides = <table> {}
 CreateLayout = <function> @ LitePanels\core.lua:61:
}
f = <table> {
 anchor_to = "BOTTOMRIGHT"
 y_off = 5
 OnLoad = <function> @ LitePanels\layout.lua:77:
 parent = UIParent {}
 x_off = -5
 width = 400
 bg_color = "0.01 0.01 0.01"
 name = "LP_RecountPanel"
 height = 143
 OnEvent = <function> @ LitePanels\layout.lua:80:
 strata = "BACKGROUND"
 bg_alpha = 1
}
origparent = nil
origanchor = nil
panel = LP_RecountPanel {
 RegisterEvent = <function> defined =[C]:-1
 height = 143
 0 = <userdata>
 bg = <unnamed> {}
 width = 400
}
ipairs = <function> defined =[C]:-1
d = <table> {
 text = <table> {}
 strata = "BACKGROUND"
 y_off = 0
 gradient_color = "1 1 1"
 parent = "UIParent"
 anchor_from = "BOTTOMLEFT"
 border = "Interface/Tooltips/UI-Tooltip-Border"
 width = 0
 border_alpha = 1
 bg_color = "0 0 0"
 bg_alpha = 1
 border_color = "1 1 1"
 height = 0
 border_size = 16
 x_off = 0
 anchor_to = "BOTTOMLEFT"
}
pairs = <function> defined =[C]:-1
is = <function> @ LitePanels\core.lua:44:
hidden = <table> {
}
IsAddOnLoaded = <function> defined =[C]:-1
deps = <table> {
}
strmatch = <function> defined =[C]:-1
lp = lp_C {
 0 = <userdata>
}
Resize = <function> @ LitePanels\core.lua:110:
unpack = <function> defined =[C]:-1
setcolor = <function> @ LitePanels\core.lua:48:
gsub = <function> defined =[C]:-1
hooksecurefunc = <function> defined =[C]:-1

  ---
My Layout File for close scrutiny, thanks again for any assistance given, I know I am being a pain, kind of feel stupid in fact that I can't figure this out but what are ya going to do.

layout.lua
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill
  Reply With Quote
06-27-10, 10:23 AM   #235
haylie
A Scalebane Royal Guard
 
haylie's Avatar
Join Date: May 2009
Posts: 417
You're missing a lot of commas, before nearly every "},".

The correct syntax for border size is "border_size = 5," (without quotes around the value). Same for border_alpha.

As for the script itself, I'm not that knowledgeable, so can't help you there

Last edited by haylie : 06-27-10 at 10:26 AM.
  Reply With Quote
06-27-10, 01:56 PM   #236
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar
Join Date: Dec 2006
Posts: 341
Well I get no errors and everything loads fine when I dont have this bit in there:
Code:
        OnLoad=function(self)
            self:RegsiterEvent'CHAT_MSG_CHANNEL_NOTICE'
        end,
        OnEvent=function(self)
            if event == "CHAT_MSG_CHANNEL_NOTICE" then
            if arg1 == "YOU_JOINED" and arg7 == 2 then
                Recount_MainWindow:Hide()
            elseif arg1 == "YOU_LEFT" and arg7 == 2 then
                Recount_MainWindow:Show()
                end
            end
        end,
the only time I get an error is with that code in there but I guess for now I will just do without it sadly but if someone has the answer sometime I'd appreciate it, I will probably dink about a little more with it and try to get it going a little while longer but I don't hold out much hope.
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill
  Reply With Quote
06-28-10, 12:21 PM   #237
nulir
A Deviate Faerie Dragon
 
nulir's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 14
just a stupid question,

im using the little statsblock from the first page, but is it possible to add a dps meter in there ? or do i have to use a different addon ?
i wanted to have as little as possible addon windows on my screen, but im a total noob with lua.
  Reply With Quote
06-28-10, 04:56 PM   #238
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
Originally Posted by Miralen View Post
Well I get no errors and everything loads fine when I dont have this bit in there:
Code:
        OnLoad=function(self)
            self:RegsiterEvent'CHAT_MSG_CHANNEL_NOTICE'
        end,
        OnEvent=function(self)
            if event == "CHAT_MSG_CHANNEL_NOTICE" then
            if arg1 == "YOU_JOINED" and arg7 == 2 then
                Recount_MainWindow:Hide()
            elseif arg1 == "YOU_LEFT" and arg7 == 2 then
                Recount_MainWindow:Show()
                end
            end
        end, 
the only time I get an error is with that code in there but I guess for now I will just do without it sadly but if someone has the answer sometime I'd appreciate it, I will probably dink about a little more with it and try to get it going a little while longer but I don't hold out much hope.
The only thing I can think of is the comma's after the function end's(highlighted for easy reference). Try removing them and see how it goes.
  Reply With Quote
06-28-10, 05:17 PM   #239
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar
Join Date: Dec 2006
Posts: 341
I believe I've tried that and it didn't help and since their in the same spot as Katae's example for the afk mod I figure they should be there but I will try it again and double check just to make sure.

Edit: yep tried it and it didnt work in fact when I tried it none of my panels showed up.
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill

Last edited by Miralen : 06-28-10 at 06:21 PM.
  Reply With Quote
06-29-10, 03:24 PM   #240
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
Thats ok I'm not to sure about lua syntax.

However I've spotted a spelling mistake in your code:
Code:
        OnLoad=function(self)
            self:RegsiterEvent'CHAT_MSG_CHANNEL_NOTICE'
        end,
        OnEvent=function(self)
            if event == "CHAT_MSG_CHANNEL_NOTICE" then
            if arg1 == "YOU_JOINED" and arg7 == 2 then
                Recount_MainWindow:Hide()
            elseif arg1 == "YOU_LEFT" and arg7 == 2 then
                Recount_MainWindow:Show()
                end
            end
        end,
should be:
Code:
        OnLoad=function(self)
            self:RegisterEvent'CHAT_MSG_CHANNEL_NOTICE'
        end,
        OnEvent=function(self)
            if event == "CHAT_MSG_CHANNEL_NOTICE" then
            if arg1 == "YOU_JOINED" and arg7 == 2 then
                Recount_MainWindow:Hide()
            elseif arg1 == "YOU_LEFT" and arg7 == 2 then
                Recount_MainWindow:Show()
                end
            end
        end,
See if that helps.
  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