LitePanels
This is the official discussion thread for LitePanels. Feel free to submit your own scripts, layouts, or general questions here. Please use the addon's comments for bug reporting and feature requests. What is LitePanels exactly? It's basically a framework for quickly building and editing panel art and scripts from a layout file. LitePanels has no GUI configuration. Full documentation is provided in the default layout.lua file. Who should use it? UI compilation authors, anyone who wants a more open way to edit layouts, or anyone with a slight programming background or willing to learn. There's a slight learning curve, but once understood what a layout should look like, panels can be created quickly and shared easily. Tutorials » Getting Started » Using Art Textures and Viewport » Gradients, Text, and Script Examples Plugins » LiteStats - Conceptual data text addon. User Scripts, UIs » Skarj: Skaarj UI » bluenjoy: BluenJoyUI » Aesh: NeoClassic » Minerv: KUI » Dajova: Dajova UI mini » Katae: Buff Watch Please notify me to add your link to this list. Development by myself has ceased, any interested individuals may fork me @ github to fix bugs or update patch compatibility. |
Gradients with a stats display
I'll start with some scripts I've been using. This is the same layout code I used for the stats display, copy and paste this into the default or your character's profile. This also demonstrates the built-in class coloring. If you want to only use the gradient box, you could remove the stats panel (name = "Stats") and tweak the dimensions, locations, and colors. (Font in the screenshot is 04B_03) Code:
lpanels:CreateLayout("Stats", { If you're like me and you have auto-clear afk turned off, you may sometimes unintentionally spam your friends. This functionality is much like LazyAFK. Whether this is useful for you or not, I'm hoping to demonstrate how simple addons can be created with relative ease using this framework. Also note that you may create multiple text objects per frame. Code:
lpanels:CreateLayout("Afker", { |
Nice addon here.
Your AFK example looks a lot like my LazyAFK. I like it! :D |
Quote:
|
I guess i'm too new to messing around with the UI to know how exactly to make this work. I have read the documentation but still am very lost.
Would it be possible for you to post your complete lua file so I may see what you did where. That way I have something to go one instead of being completely in the dark. |
Quote:
Code:
lpanels:CreateLayout("LayoutName", { Code:
lpanels:ApplyLayout("n:yourchar r:yourrealm", "LayoutName", "AnotherLayout") Next, you'll want to start making your panels. Lets say, for example, you want to make a black bar at the bottom of your UI. You would use something like this panel code inside of your layout, between the first set of {curly braces}: Code:
{ name = "BlackBar", -- names your panel "BlackBar" Code:
-- Your original black bar panel If all was done correctly, you should now have a bar with 2 borders that looks like this. You'll use other attributes from the documentation such as gradients and textures much the same way. You should also note that every single panel attribute has a default value, which are noted in the docs. Hope this has cleared up some things for you! |
Quote:
|
Quote:
Thanks :) Working like a charm now. I will post my layouts when I finish converting them from KG. This is SO much easier to deal with than KG.... Again, thanks a ton for the quick reply. :) /cbuck |
Intercept mouse clicks
Ive been searching for hours to find out how to get the panels to intercept mouse clicks to no avail. the code I'm using doesn't give any errors but doesn't intercept the mouse clicks either, its like its not even there. this is the part im trying to get to work:
{ name = "Right", anchor_to = "BOTTOM", y_off = 300, x_off = 546.5, mouse = false, width = "272", height = 195, bg_color = {0,0,0}, bg_alpha = 1, }, am i using the right code is it in the right place? thanks in advance for any information anyone can give me. Mugs ps: im trying to learn how to write the addons. ive found this a great learning experience. i would prefer for someone to point me in the right direction for finding the information myself through forums, etc instead of just "handing" to me, so to speak. thanks again |
When you set `mouse = true`, this will set the frame to intercept clicks. The same behavior will be default if you give the frame an OnClick, OnEnter, or OnLeave script.
|
Thank you
That was fast. thank you. works like a charm
|
I need some help, cause i can't get this to work >.<
I am trying to switch from Btex to LitePanels, but i'm stuck with the fact that i don't know how to use artwork to make it work with it. I wanna make it look like THIS. Have a idea of how to do it and maybe even supply with the code (i'm a UI supplier, yes, will release this UI when it's done)? |
Quote:
Code:
["Default"] = { Placing art with 3 sections +Viewport The left and right images can both be set to a static width, and the middle image will be stretched to fit any resolution. Code:
lpanels:CreateLayout("Viewport Art x3", { This was a bit easier than 3 since they can all be 25% width. Code:
lpanels:CreateLayout("Art x4", { Only want a simple viewport? This is all you need. Code:
lpanels:CreateLayout("Viewport", nil, {bottom=20, top=20}) |
thx for the fast reply, but actually, it's 4 separated images provided from Btex.
Gonna test the code tomorrow, i'll give ya a shout if it works ;) EDIT: Did a quick testing, but no success... you know any program to merge those 4 images into 1? I have tried paint, but no luck xD |
Great Addon!
|
If you want to put a panel behind its parent frame, you need to set 'level' to 0.
|
... nope, it doesnt work :/
Quote:
|
Katae,
Can you example doing an onupdate resize? One that follows the size of the ChatFrame. Thanks either way! :) :banana: |
Quote:
|
Quote:
|
All times are GMT -6. The time now is 08:23 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI