Download
(14Kb)
Download
Updated: 06-30-11 01:19 PM
Pictures
File Info
Updated:06-30-11 01:19 PM
Created:06-02-09 02:13 PM
Downloads:27,954
Favorites:173
MD5:

LitePanels  Popular! (More than 5000 hits)

Version: 40200.1
by: Katae [More]

LitePanels is a UI panel art framework aimed for use by both UI authors and advanced users. There is no in-game config. Configuration is done through editing a layout file. Complete documentation is provided in the layout file.

Copy layout_example.lua to layout.lua before use!

Special features:
» Quickly build modular, self-contained, easily sharable, fully customizable UI "panels". Complete with optional text objects and scripts.
» Full scripting capabilities!
» Built-in class coloring; Class Colors supported.
» Automatic panel to parent resizing with height and width percentages.
» Simple viewport functionality.


Enjoy.

Feel free to discuss this addon and/or share your own layouts, scripts, or show off your LitePanels UI in the LitePanels Layout Discussion thread. Please, however, use the addon comments page for bug reporting and feature requests.

40200.1 - 2011-06-30
- 4.2 toc update.

40100.1 - 2011-06-12
- 4.1 toc update.

40000.1 - 2010-10-13
- 4.0 toc update.

30300.2 - 2010-03-24
- Texture method SetTexCoordModifiesRect was removed with 3.3.3 patch. Commented line out to prevent errors.

1.5.2 - 2009-12-08
- 3.3 toc update.
- Some optimizations.

1.5.1 - 2009-11-11
- Error handling added for invalid fonts.

1.5a - 2009-10-11
- Fixed pre-1.5 backwards compatibility.

1.5 - 2009-10-07
- Plugin-like support added.
- New profiles system, see included example layout for info. Although old layouts will continue to work, it is advised that old layouts are converted to the new system.
- Panel borders can now be set to "SOLID" to create a pixel border.
- Panels with a % height/width will now resize based on its anchor_frame; parent secondary.
- New text attribute: outline - (1) thin outline, (2) thick outline. Setting an outline disables the default shadow effect, may be enabled manually.
- New text attribute: mono - True sets font's monochrome flag.
- Misc bug fixes and optimizations.

1.4.1 - 2009-08-17
- CreateFrame hook will load sooner, this should (hopefully) fix many problems with panels not being set to the right parent frame.
- The anchor_frame setting will now recognize existing panels as intended.
- Added support for Class Colors by Phanx.

1.4 - 2009-08-10
- Changed supplied layout filename to layout_example.lua.
- Border support added. See documentation for syntax.
- Percentage width/height rescaling is now on by default, attribute is obsolete.
- Throttling variable created for OnUpdate scripts (self.elapsed)
- Text object references will now be sent through to their string function.
- Layout "character - realm" names are no longer case-sensitive.
- New attribute: anchor_frame (defaults to parent). Sets the panel anchor frame if you'd like to anchor a panel to a frame other than parent while keeping parent's visibility, scale, alpha, etc.
- New script handlers: OnResize, OnDoubleClick, OnMouseDown, OnMouseUp

1.3.2 - 2009-08-04
- TOC updated to 3.2

1.3.1 - 2009-08-03
- Fixed a bug with texture rotate.
- Changed attribute 'active_scale' to 'resize'.
- Added missing attribute 'scale' to documentation.

1.3 - 2009-08-01
- Super duper code optimizations.
- The default value for bg_alpha will no longer be set to 0.0 when tex_file has a value.
- Function text object panels will now correctly adjust its height and width when changed.
- Panels with parents that don't exist will now be attached to the parent when it's created.
- Text shadows will now default to 1. Set shadow to 0 to turn it off.
- New attribute: active_scale (off by default). Panels with a height or width percentage will automatically adjust themselves when the parent's height or width is changed. Usage: `active_scale = true`
- New attribute: inset (defaults to 0). Creates an inset on the panel. Usage: for all sides use `inset=5` or specific `inset={top=5,bottom=5}`. Negative values create a padding effect.

1.2 - 2009-07-08
- Full text object support added, see docs.
- Changed default profile to always load.
- A few code optimizations.

1.1a - 2009-06-30
- DK class coloring fixed.

1.1 - 2009-06-30
- Complete overhaul. Many layout modifications, your old layout will not work without some changes (see documentation).
- Viewport, gradients, and texture art support added.
- Player class color panel setting added.
- User scripting support.
- Better parent handling with other panels.
- May now use height or width as a percentage in reference to its parent frame.

1.0a - 2009-06-02
- Suppressed "LPanels" error when the variable doesn't exist (when layout file is still layout.lua.txt)

1.0 - 2009-06-02
- Initial release.
Optional Files (1)
File Name
Version
Size
Author
Date
Type
40200.1
60kB
06-30-11 01:16 PM
Addon


Post A Reply Comment Options
Unread 07-17-10, 01:12 PM  
Bandes
A Kobold Labourer

Forum posts: 1
File comments: 73
Uploads: 0
Hello
since the update my chat is so dark, (
I wonder what lies on the
Last edited by Bandes : 07-17-10 at 01:13 PM.
Report comment to moderator  
Reply With Quote
Unread 07-16-10, 06:41 PM  
chj722
A Kobold Labourer

Forum posts: 0
File comments: 10
Uploads: 0
why i cant see anything? I change the name "layout_example.lua" to "layout.lua".
Report comment to moderator  
Reply With Quote
Unread 06-28-10, 08:59 PM  
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 258
File comments: 165
Uploads: 2
The latest versions of Event Horizon, Taroven has added an option to fix the frame size, so now we can make a panel then resize and anchor EH to it
Well then I guess I'll update EH eventually. Glad its working now. And yeah more I play with Litepanels, the more I play with my UI, the less I actually play. Vicious cycle haha
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
Report comment to moderator  
Reply With Quote
Unread 06-26-10, 07:14 PM  
Gylindor
A Defias Bandit

Forum posts: 3
File comments: 23
Uploads: 0
Originally posted by Unkn
You can't. I've tried. I can hide Event Horizon's Main frame but parenting a panel to it doesnt work. You can parent to EventHorizon_VitalsFrame though. Which actually looks good.

Btw Katae, the more I play with LitePanels and LiteStats, the more I love these addons. Thanks again man.
Yeah I feel the same, only thing is nowdays I spendmore time playing about with my UI then actually playing

The latest versions of Event Horizon, Taroven has added an option to fix the frame size, so now we can make a panel then resize and anchor EH to it
Report comment to moderator  
Reply With Quote
Unread 06-21-10, 11:19 PM  
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 258
File comments: 165
Uploads: 2
Originally posted by Gylindor
Oh, and how can I create a panel, parented to EventHorizon's mainframe
You can't. I've tried. I can hide Event Horizon's Main frame but parenting a panel to it doesnt work. You can parent to EventHorizon_VitalsFrame though. Which actually looks good.



Btw Katae, the more I play with LitePanels and LiteStats, the more I love these addons. Thanks again man.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
Report comment to moderator  
Reply With Quote
Unread 04-16-10, 04:33 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by hankthetank
Can you add tex_tile?
Possibly, glad you have a working fix, though.
Report comment to moderator  
Reply With Quote
Unread 04-13-10, 06:45 AM  
hankthetank
A Theradrim Guardian
 
hankthetank's Avatar
AddOn Author - Click to view AddOns

Forum posts: 64
File comments: 132
Uploads: 6
Can you add tex_tile?

Made a workaround like that:

Code:
OnLoad = function(self)
	  self.bg:SetTexture("Interface\\AddOns\\SharedMedia\\background\\hanks2.tga", true)
	  self.bg:SetVertexColor(0.22, 0.22, 0.19)
	  self.bg:SetHorizTile(true)
	  self.bg:SetVertTile(true)
	  self.bg:SetAlpha(0.66)
end,
Last edited by hankthetank : 04-13-10 at 07:20 AM.
Report comment to moderator  
Reply With Quote
Unread 04-13-10, 03:22 AM  
Gylindor
A Defias Bandit

Forum posts: 3
File comments: 23
Uploads: 0
/hugs Katae

thx, I'll check it all out later after I finish work
Report comment to moderator  
Reply With Quote
Unread 04-10-10, 11:55 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by Gylindor
Is it possible to make panels coloured depending on the state of your latency, framerate, and memory useage?
There's a lot of code to begin writing a custom panel within the LiteStats source. The basic idea would be to add an OnUpdate function to your panels's code:
Code:
{ -- normal panel stuff
  OnUpdate = function(self, u)
    self.elapsed = self.elapsed + u
    if self.elapsed > 1.0 then -- seconds to throttle the code below
      -- do some computation to determine the color here
      col = { r = 0, g = 1, b = 0 }
      -- then simply set the background color on this panel
      self.bg:SetTexture(col.r, col.g, col.b, 1)
      self.elapsed = 0
    end
  end
}
Originally posted by Gylindor
Oh, and how can I create a panel, parented to EventHorizon's mainframe
Sorry, I don't know.
Originally posted by Gylindor
Ok last one (sorry) how can I make this display the class/reaction of the target frame, rather than my class?
Again, you'll need to create a function to attach to your panel, and set the background texture after doing a bit of computation for the color. You can use something like this:
Code:
{ -- yep, panel stuff
  OnLoad = function(self)
    self:RegisterEvent'PLAYER_TARGET_CHANGED'
  end,
  OnEvent = function(self, event)
    if UnitExists("target") and UnitReaction("player","target") > 4 then
      self.bg:SetTexture(0,1,0,1) -- ohai :P~
    elseif UnitExists("target") and UnitReaction("player","target") == 4 then
      self.bg:SetTexture(1,1,0,1) -- meh :/
    else
      self.bg:SetTexture(1,0,0,1) -- scum! :O
    end
  end
}
Good luck!

Disclaimer: I cannot test any of this code.
Last edited by Katae : 04-10-10 at 11:59 PM.
Report comment to moderator  
Reply With Quote
Unread 04-10-10, 09:54 PM  
Gylindor
A Defias Bandit

Forum posts: 3
File comments: 23
Uploads: 0
Is it possible to make panels coloured depending on the state of your latency, framerate, and memory useage?

eg:
latency; 0-150 = green, 150-300 = yellow, etc, etc
same sort of thing with fps and mem'

I know that something similar could be done with those within Litestats, just can't find the post about the variable colouring atm

.....or just direct me to that post, the idea I have might work better using Litestats

Oh, and how can I create a panel, parented to EventHorizon's mainframe, as using /run print(GetMouseFocus():GetParent():GetName()) script just returns "worldframe"

What I have so far is this:

--ehz
{ name="ehz", parent= "EventHorizonFrame", anchor_to="CENTER", anchor_from="CENTER", width="100%", height="100%",
bg_color={0,0,0}, bg_alpha=0.5, border= "SOLID", border_color= "CLASS", border_alpha=1,
},

--vitals
{ name="ehz_vitals", parent= "EventHorizon_VitalsFrame", anchor_to="CENTER", anchor_from="CENTER", width="100%", height="100%",
bg_color={0,0,0}, bg_alpha=0.5, border= "SOLID", border_color= "CLASS", border_alpha=1,
},

vitals works, but not ehz, took the frame names from the respective parts of their core code, seeing as the mouseover script didn't help much

ehz - line 21 - local EventHorizonFrame = CreateFrame('Frame','EventHorizonFrame',UIParent)

vitals - line 39 - local frame = CreateFrame('Frame','EventHorizon_VitalsFrame',UIParent)

I want to parent this panel to eventhorizon so that it hides/scales etc automatically with it

Ok last one (sorry) how can I make this display the class/reaction of the target frame, rather than my class?

{ parent="target", height="100%", width="100%", anchor_to="CENTER", inset=-1,
bg_color={0,0,0}, bg_alpha=0, border = "SOLID", border_color = "CLASS",
},
Last edited by Gylindor : 04-10-10 at 10:23 PM.
Report comment to moderator  
Reply With Quote
Unread 04-08-10, 12:24 AM  
river444
A Defias Bandit

Forum posts: 3
File comments: 6
Uploads: 0
Originally posted by Katae
Find the x_off and y_off variables in the panel configurations and change the integer values higher to move up or right, or lower to move down or left.

Thanks worked great
Report comment to moderator  
Reply With Quote
Unread 04-08-10, 12:00 AM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by river444
Hello, I am fairly new to editing lua files. I love it, but im not quite sure how to do things. I downloaded a layout compilation ( oUF ) but there's a panel up to the top I wish to resize and move down to the bottom. Do you happen to know the specific area in the LitePanels code I need to go to, to change this? I looked but I don't want to break it. lol

Any help would be appreciated
Find the x_off and y_off variables in the panel configurations and change the integer values higher to move up or right, or lower to move down or left.
Report comment to moderator  
Reply With Quote
Unread 04-07-10, 11:44 PM  
river444
A Defias Bandit

Forum posts: 3
File comments: 6
Uploads: 0
Hello, I am fairly new to editing lua files. I love it, but im not quite sure how to do things. I downloaded a layout compilation ( oUF ) but there's a panel up to the top I wish to resize and move down to the bottom. Do you happen to know the specific area in the LitePanels code I need to go to, to change this? I looked but I don't want to break it. lol

Any help would be appreciated
Report comment to moderator  
Reply With Quote
Unread 03-25-10, 06:25 PM  
Fiercy
A Cyclonian
 
Fiercy's Avatar
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 142
Uploads: 7
Originally posted by Katae
Try the fix mentioned below, the patch messed up part of the textures code.
Oh, I didn't know the two were related, tyvm

I'm new to LitePanels and it didn't give me any errors so who knew hehe.
__________________
There are countless ingredients that make up the human body and mind, like all the components that make up me as an individual with my own personality. Sure, I have a face and voice to distinguish myself from others, but my thoughts and memories are unique only to me, and I carry a sense of my own destiny. Each of those things are just a small part of it. I collect information to use in my own way. All of that blends to create a mixture that forms me and gives rise to my conscience.
Last edited by Fiercy : 03-25-10 at 06:26 PM.
Report comment to moderator  
Reply With Quote
Unread 03-25-10, 05:10 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by Fiercy
So, I've been as this for a while. I'd love you long time if you can tell me what I'm doing wrong :P
Try the fix mentioned below, the patch messed up part of the textures code.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.