Category: Graphic UI Mods
Addon Information
Works with 3.2
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
Author:
Version:
1.5.1
Date:
11-11-2009 09:39 AM
Size:
13.31 Kb
Downloads:
5,152
Favorites:
98
MD5:
Pictures
Click to enlarge
pally alt + viewport + textures + stat scripts
Fully scriptable text objects
Gradients with built-in class coloring (priest)
Yay, panels!
LitePanels   Popular! (More than 5000 hits)
LitePanels is, in essence, a UI panel art framework aimed for use by both UI authors and normal users. It was created to be a solid, lightweight alternative to kgPanels.

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:
» Minimal code; low memory usage
» Easy to create and share layouts
» Multiple text objects per panel
» Built-in class coloring
» Automatic panel/parent resizing
» Viewport functionality

Enjoy.

Feel free to discuss this addon or share your own layouts and scripts in the LitePanels Layout Discussion thread.
  Change Log - LitePanels
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 - LitePanels
File Name
Version
Size
Author
Date
Type
0.9.6c
26kB
11-12-2009 06:42 AM
Addon
  Archived Versions - LitePanels
File Name
Version
Size
Author
Date
1.5a
13kB
Katae
10-12-2009 04:06 AM
1.5
13kB
Katae
10-07-2009 09:31 PM
1.4.1
10kB
Katae
08-18-2009 05:57 AM
1.4
10kB
Katae
08-10-2009 09:58 AM
1.3.2
9kB
Katae
08-04-2009 06:47 PM
1.3.1
9kB
Katae
08-03-2009 04:50 AM
1.3
9kB
Katae
08-01-2009 09:00 AM
1.2
8kB
Katae
07-08-2009 12:39 PM
1.1a
6kB
Katae
06-30-2009 11:41 PM
1.1
6kB
Katae
06-30-2009 08:36 PM
1.0a
2kB
Katae
06-03-2009 01:16 AM
1.0
3kB
Katae
06-02-2009 04:39 PM
  Comments - LitePanels
Post A Reply Comment Options
Unread Yesterday, 05:20 PM  
Shestak
A Murloc Raider
 
Shestak's Avatar

Forum posts: 8
File comments: 162
Uploads: 4
Quote:
Originally posted by Katae
Code:
name = name, anchor_frame = m.anchor_frame,
And change to:
Code:
name = name, parent = m.anchor_frame,
Keep in mind that the texts will now inherit parent scale, alpha, and visibility.
After these changes appeared a small problem from other users in Shestak UI. See comments(screenshots).
Problem in: strata = "HIGH", level = 99,
__________________
Modified Alekk UI for 1280*800.
Shestak UI for 1280*800, screenshots.
Modified Neav UI for 1280*800, screenshots.

Last edited by Shestak : 11-22-2009 at 05:22 PM.
Shestak is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old Yesterday, 03:14 AM  
Shestak
A Murloc Raider
 
Shestak's Avatar

Forum posts: 8
File comments: 162
Uploads: 4
Quote:
Originally posted by Katae
Example

You'll then anchor texts to StatContainer instead of BoxL.
Many thanks for the help and advice.
__________________
Modified Alekk UI for 1280*800.
Shestak UI for 1280*800, screenshots.
Modified Neav UI for 1280*800, screenshots.
Shestak is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old Yesterday, 02:44 AM  
Katae
A Flamescale Wyrmkin
 
Katae's Avatar
Interface Author - Click to view interfaces

Forum posts: 124
File comments: 122
Uploads: 5
Quote:
Originally posted by Shestak
Do I do? After restarting the panel does not appear.
Example

You'll then anchor texts to StatContainer instead of BoxL.
Katae is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old Yesterday, 01:38 AM  
Shestak
A Murloc Raider
 
Shestak's Avatar

Forum posts: 8
File comments: 162
Uploads: 4
Quote:
Originally posted by Katae
Create an invisible container panel with your mouse scripts and parent your gradient panels inside it.

Use this OnLeave on that invisible panel (or just on both gradient panels), it will only hide when not hovering over any litepanel objects:
Code:
OnLeave = function(self)
  if not strmatch(GetMouseFocus():GetName(),"^LP_") then
    self:SetAlpha(0)
  end
end
Do I do? After restarting the panel does not appear.
Code:
{   name = "BoxL",
    anchor_to = "TOP",
    width = 240, height = 20,
    x_off = -240/2, y_off = -10,
    gradient = "H",
    bg_color = "CLASS", gradient_color = "CLASS",
    bg_alpha = 0, gradient_alpha = 0.2,
    OnLoad=function(self)
    self:SetAlpha(0)
    end,
    OnEnter=function(self)
    self:SetAlpha(1)
    end,
    OnLeave=function(self)
    if GetMouseFocus():GetParent() ~= self then
    self:SetAlpha(0)
    end
    end,
},
{   name = "InvBoxL", parent = "BoxL",
    anchor_to = "LEFT",
    width = "200%", height = "100%",
    bg_alpha = 0,
    OnLeave = function(self)
    if not strmatch(GetMouseFocus():GetName(),"^LP_") then
    self:SetAlpha(0)
    end
    end,
},
__________________
Modified Alekk UI for 1280*800.
Shestak UI for 1280*800, screenshots.
Modified Neav UI for 1280*800, screenshots.
Shestak is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old Yesterday, 01:01 AM  
Katae
A Flamescale Wyrmkin
 
Katae's Avatar
Interface Author - Click to view interfaces

Forum posts: 124
File comments: 122
Uploads: 5
Quote:
Originally posted by Shestak
Oh, feeling better already. But this effect acts only on the first module of the entire line. And on the other modules are not working and the same is not the correct effect.
...
And so, I noticed that the appearance of the panel when the cursor only works if the cursor is pointed at the left side panel. And if you roll over on the right side panel, it does not appear.
Create an invisible container panel with your mouse scripts and parent your gradient panels inside it.

Use this OnLeave on that invisible panel (or just on both gradient panels), it will only hide when not hovering over any litepanel objects:
Code:
OnLeave = function(self)
  if not strmatch(GetMouseFocus():GetName(),"^LP_") then
    self:SetAlpha(0)
  end
end

Last edited by Katae : 11-22-2009 at 01:07 AM.
Katae is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-22-2009, 12:18 AM  
Shestak
A Murloc Raider
 
Shestak's Avatar

Forum posts: 8
File comments: 162
Uploads: 4
Quote:
Originally posted by Katae
Try using this as your OnLeave function, it should ignore when entering over stats:
Code:
OnLeave = function(self)
  if GetMouseFocus():GetParent() ~= self then
    self:SetAlpha(0)
  end
end
Oh, feeling better already. But this effect acts only on the first module of the entire line. And on the other modules are not working and the same is not the correct effect.
My modules on the panel - Friends/Guild/Durability/....
Code Guild module:
Code:
Guild = {
enabled = true,
fmt = class"G:".."%d/%d", 
maxguild = nil, 
threshold = 1, 
sorting = "class", 
anchor_frame = "Friends", anchor_to = "left", anchor_from = "right",
x_off = 5, y_off = 0, tip_anchor = "ANCHOR_BOTTOMLEFT", tip_x = 0, tip_y = 0
},
upd:
And so, I noticed that the appearance of the panel when the cursor only works if the cursor is pointed at the left side panel. And if you roll over on the right side panel, it does not appear.
__________________
Modified Alekk UI for 1280*800.
Shestak UI for 1280*800, screenshots.
Modified Neav UI for 1280*800, screenshots.

Last edited by Shestak : 11-22-2009 at 12:24 AM.
Shestak is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-21-2009, 11:58 PM  
Katae
A Flamescale Wyrmkin
 
Katae's Avatar
Interface Author - Click to view interfaces

Forum posts: 124
File comments: 122
Uploads: 5
Quote:
Originally posted by Shestak
taking the cursor to the panel to move it to the text of Statistics (any), the panel disappears along with the text.
Try using this as your OnLeave function, it should ignore when entering over stats:
Code:
OnLeave = function(self)
  if GetMouseFocus():GetParent() ~= self then
    self:SetAlpha(0)
  end
end
Katae is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-21-2009, 11:38 PM  
Shestak
A Murloc Raider
 
Shestak's Avatar

Forum posts: 8
File comments: 162
Uploads: 4
Quote:
Originally posted by Katae ...
Thank you, all done as you suggested. Everything turned out as I wanted.
But came a moment. If I put the cursor on the panel, its response in line with our change, but if not taking the cursor to the panel to move it to the text of Statistics (any), the panel disappears along with the text. Ie it turns out that the text of statistics is not one with the panel. I hope you understand my English.

In LitePanels:
Code:
{   name = "BoxL",
    anchor_to = "TOP",
    width = 240, height = 20,
    x_off = -240/2, y_off = -10,
    gradient = "H",
    bg_color = "CLASS", gradient_color = "CLASS",
    bg_alpha = 0, gradient_alpha = 0.2,
    OnLoad=function(self)
    self:SetAlpha(0)
    end,
    OnEnter=function(self)
    self:SetAlpha(1)
    end,
    OnLeave=function(self)
    self:SetAlpha(0)
    end,
},
In LiteStats:
Code:
Friends = {
    enabled = true, 
    fmt = class"F:".."%d/%d",
    maxfriends = nil, 
    anchor_frame = "BoxL", anchor_to = "center", anchor_from = "center",
    x_off = -50, y_off = 1, tip_anchor = "ANCHOR_BOTTOMLEFT", tip_x = 0,     tip_y = 0
},
__________________
Modified Alekk UI for 1280*800.
Shestak UI for 1280*800, screenshots.
Modified Neav UI for 1280*800, screenshots.

Last edited by Shestak : 11-21-2009 at 11:44 PM.
Shestak is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-21-2009, 11:08 PM  
Katae
A Flamescale Wyrmkin
 
Katae's Avatar
Interface Author - Click to view interfaces

Forum posts: 124
File comments: 122
Uploads: 5
Quote:
Originally posted by Shestak
At the start of the game panel visible. Once I tidy up the cursor with the panel, the panel disappears, but again does not appear if I brought the cursor. And just when the bar disappears, then it does not disappear with statistics attached to this panel. Prompt the decision, thanks in advance.
Instead of using Hide()/Show(), use SetAlpha(0)/SetAlpha(1). When you hide a frame, there's no longer anywhere to trigger the mouseover, and scripts no longer run on hidden frames.

Texts in litestats are given the anchor_frame attribute, which makes it so they don't inherit anything except anchor points. You can remedy this easily by going to this line in litestats core.lua:

Code:
name = name, anchor_frame = m.anchor_frame,
And change to:
Code:
name = name, parent = m.anchor_frame,
Keep in mind that the texts will now inherit parent scale, alpha, and visibility.

Last edited by Katae : 11-21-2009 at 11:08 PM.
Katae is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-21-2009, 10:39 PM  
Shestak
A Murloc Raider
 
Shestak's Avatar

Forum posts: 8
File comments: 162
Uploads: 4
In LitePanels:
Code:
{   name = "BoxL",
    anchor_to = "TOP",
    width = 240, height = 20,
    x_off = -240/2, y_off = -10,
    gradient = "H",
    bg_color = "CLASS", gradient_color = "CLASS",
    bg_alpha = 0, gradient_alpha = 0.2,
    OnEnter=function(self)
    self:Show()
    end,
    OnLeave=function(self)
    self:Hide()
    end,
},
In LiteStats:
Code:
Friends = {.....
    anchor_frame = "BoxL",
},
At the start of the game panel visible. Once I tidy up the cursor with the panel, the panel disappears, but again does not appear if I brought the cursor. And just when the bar disappears, then it does not disappear with statistics attached to this panel. Prompt the decision, thanks in advance.



__________________
Modified Alekk UI for 1280*800.
Shestak UI for 1280*800, screenshots.
Modified Neav UI for 1280*800, screenshots.
Shestak is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-17-2009, 05:28 PM  
Katae
A Flamescale Wyrmkin
 
Katae's Avatar
Interface Author - Click to view interfaces

Forum posts: 124
File comments: 122
Uploads: 5
Re: Is it really not working or am I being dumb?

It's probably just a syntax error, can you PM me your layout.lua?
Quote:
Originally posted by Star1814
It's confusing me -- have I missed something?
Katae is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-17-2009, 10:51 AM  
Star1814
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
Question Is it really not working or am I being dumb?

I really wanted this to work so I could replace kgpanels (which is acting weird lately) ... I copied the entire sample layout in the end and only replacing the character name with the character I'm testing it with, but alas ... It's not showing up, all other addons disabled even to make sure

Quote:
Message: Interface\AddOns\LitePanels\layout.lua:1: unexpected symbol near '??
Count: 1
Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
[C]: ?
The default lua error frame is kinda sucky, but yeah ... for example, I don't have a folder called FrameXML in my Interface folder. It's confusing me -- have I missed something?
Star1814 is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-15-2009, 06:35 PM  
Katae
A Flamescale Wyrmkin
 
Katae's Avatar
Interface Author - Click to view interfaces

Forum posts: 124
File comments: 122
Uploads: 5
Quote:
Originally posted by Strongbow
I want to make a panel behind my classbar but since different classes have different amount of buttons i would like to have one that changes when im on different character, is that possible ?
The easiest way would be to make one profile for all the unchanging panels, and other profiles for no class buttons, one, two, etc, then apply.

To extend this to detect automatically, you can somehow find out how many class buttons there are (don't know this off the top of my head) and apply layout based on that.

Something like this:
Code:
lpanels:CreateLayout("ClassAll", {
  -- your unchanging panels ...
})
lpanels:CreateLayout("Class1", {
  -- one button code ...
})
lpanels:CreateLayout("Class2", {
  -- two button code ...
})
lpanels:CreateLayout("Class3", {
  -- three button code ...
})
-- etc, etc
And then apply:
Code:
local classbuttons = 3 -- placeholder for a # of class buttons function
lpanels:ApplyLayout(nil,"ClassAll","Class"..classbuttons)
Or simply class specific:
Code:
lpanels:ApplyLayout("c:warrior c:deathknight","ClassAll","Class3")
lpanels:ApplyLayout("c:druid","ClassAll","Class6")
lpanels:ApplyLayout("c:priest","ClassAll","Class2")
-- etc, etc

Last edited by Katae : 11-15-2009 at 06:36 PM.
Katae is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-15-2009, 02:54 PM  
Strongbow
A Deviate Faerie Dragon
 
Strongbow's Avatar

Forum posts: 10
File comments: 98
Uploads: 0
I want to make a panel behind my classbar but since different classes have different amount of buttons i would like to have one that changes when im on different character, is that possible ?

This is what i have now

Code:
{   name = "ClassBarL", 
    parent = "DominosClassButton1", anchor_to = "LEFT",
    width = "100%", height = 44,
    x_off = -15/2, 
    gradient = "H",
    bg_color = "0 0 0", gradient_color = "0.22 0.20 0.20", 
    bg_alpha = 0.4, gradient_alpha = 0,
},
{   name = "ClassBarR", 
    parent = "ClassBarL", anchor_to = "LEFT", anchor_from = "RIGHT",
    width = "100%", height = "100%",
    gradient = "H",
    bg_color = "0.22 0.20 0.20", gradient_color = "0 0 0", 
    bg_alpha = 0, gradient_alpha = 0.4,
},

-- Top Left gradient line

    {    name = "Classborder1TL",
        parent = "ClassBarL", anchor_to = "TOP",
        width = "100%", height = 1,
        gradient = "H",
        bg_color = "CLASS", gradient_color = "CLASS",
        bg_alpha = 0, gradient_alpha = 0.8,
   },
-- Top right line
    {    name = "Classborder1TR",
        parent = "ClassBarR", anchor_to = "TOP",
        width = "100%", height = 1,
        gradient = "H",
        bg_color = "CLASS", gradient_color = "CLASS",
        bg_alpha = 0.8, gradient_alpha = 0,
   },

-- Bottom left line
    {    name = "Classborder1BL",
       parent = "ClassBarL", anchor_to = "BOTTOM",
       width = "100%", height = 1,
       gradient = "H",
       bg_color = "CLASS", gradient_color = "CLASS",
       bg_alpha = 0, gradient_alpha = 0.8,
   },

-- Bottom right line
     {    name = "Classborder1BR",
        parent = "ClassBarR", anchor_to = "BOTTOM",
       width = "100%", height = 1,
       gradient = "H",
        bg_color = "CLASS", gradient_color = "CLASS",
        bg_alpha = 0.8, gradient_alpha = 0,
   },
-Strongbow-
Strongbow is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-12-2009, 09:52 AM  
richerich
A Fallenroot Satyr
 
richerich's Avatar
Interface Author - Click to view interfaces

Forum posts: 28
File comments: 394
Uploads: 5
Quote:
Originally posted by Katae
The current profile system can do this. As your profile string, you can use something like: "c:mage c:warlock". Or to disable specific classes: "-c:warrior -c:deathknight".
Ay, got it to work now... took a while before i read long enough to understand how to make it work ;D
__________________


Dajova UI

Dajova UI Mini
richerich is offline Report comment to moderator   Edit/Delete Message 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.




The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.