WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Released AddOns (https://www.wowinterface.com/forums/forumdisplay.php?f=9)
-   -   LitePanels - An art framework (https://www.wowinterface.com/forums/showthread.php?t=25283)

POZETIF 01-31-11 06:47 AM

Hello! I for some reason the border that I enter are not displayed
how to solve this problem?

Tassador 02-15-11 03:51 AM

Unit Frames
 
Man,

I know its an older post, but what are the unit frames you are using ? I really love the standing player figures ;-)

Cheers, Jens



Quote:

Originally Posted by Yhor (Post 156727)
Jeez do I feel lame! Thanks a ton, now to get it sized and updating properly :).

I'm sure I'm all set, and once again, I'm loving this over the alternatives.


Edit:
Figured I'd at least show the result, so far. SS in attachment :o.


zynix 02-15-11 01:20 PM

Quote:

Originally Posted by Tassador (Post 229795)
Man,

I know its an older post, but what are the unit frames you are using ? I really love the standing player figures ;-)

Cheers, Jens

That's a part of a UI, look under the suites category, should be there :)

Yup, GrimUI

Grimsin 02-23-11 01:24 PM

Actually what Yhor put up was a remake of MazzleUI using a whole boat load of addons. I think he managed to recreate using STUFF unit frames and ZMOBDB advanced 6. Those screen shots are not actually my UI. Looks similar though, as it should :) they are all based on the Mazzle look and feel.

zynix 02-23-11 01:50 PM

Ahh, my bad :p

Clynikal 03-14-11 04:28 PM

I was following your "Getting Started" Tutorial, using this code:

Code:

lpanels:CreateLayout("LiteStats", {
}, { bottom = 150, top = 10 })
        lpanels:ApplyLayout("n:nil r:nil", "LiteStats", "AnotherLayout")
{  name = "BlackBar",
    anchor_to = "BOTTOM", y_off = 20,
    width = "100%", height = 30,
    bg_color = "0 0 0", bg_alpha = 0.5,
}, -- this is line 291

{  name = "BorderTop", parent = "BlackBar",
    anchor_to = "TOP",
    width = "100%", height = 1,
    bg_color = "CLASS", bg_alpha = 0.75,
},
{  name = "BorderBottom", parent = "BlackBar",
    anchor_to = "BOTTOM",
    width = "100%", height = 1,
    bg_color = "CLASS", bg_alpha = 0.75,
},
       
})

And when I log into WoW I recieve this error message:

Quote:

Date: 2011-03-14 16:24:14
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\LitePanels\layout.lua line 291:
unexpected symbol near ','
Debug:
[C]: ?
AddOns:
Swatter, v3.2.3 (<%codename%>)
Aloft, v4.1.3
AzCastBar, v10.10.14
Babylonian, v5.1.DEV.130
ButtonFacade, v4.0.340
ButtonfacadeNefs, v1.0
ButtonFacadePixelSkin, v1.46
ColorPickerPlus, v
Configator, v5.1.DEV.286
DBMCore, v
Gatherer, v3.2.3
Gladius, vr20110302184932
Grid, v1.40000.1432-beta
GridConfigIcons, v40000-1
GridCooldownText, v
GridIndicatorCornerIcons, v40000-2
GridIndicatorCornerText, v1.4.2
GridIndicatorSideIcons, v40000-2
GridIndicatorSidePlus, v40000-2
GridManaBars, v1.04
GridStatusHots, v4.0.1.2b
GridStatusRaidDebuff, vv3.1
GridStatusRaidIcons, v40000-2
GridStatusShield, v1.23
LitePanels, v40000.1
SharedMedia, v3.0.1-177
SlideBar, v3.2.3 (<%codename%>)
BlizRuntimeLib_enUS v4.0.6.40000 <us>
(ck=2fe)

As a result LitePanel doesn't show up on my UI and I have no idea to how fix this [I'm also pretty new to LUA :C].

Please help!

Katae 03-14-11 08:47 PM

Quote:

Originally Posted by Clynikal (Post 231755)
As a result LitePanel doesn't show up on my UI and I have no idea to how fix this [I'm also pretty new to LUA :C].

Code:

lpanels:CreateLayout("LiteStats", {
{  name = "BlackBar",
    anchor_to = "BOTTOM", y_off = 20,
    width = "100%", height = 30,
    bg_color = "0 0 0", bg_alpha = 0.5,
}, -- this is line 291

{  name = "BorderTop", parent = "BlackBar",
    anchor_to = "TOP",
    width = "100%", height = 1,
    bg_color = "CLASS", bg_alpha = 0.75,
},
{  name = "BorderBottom", parent = "BlackBar",
    anchor_to = "BOTTOM",
    width = "100%", height = 1,
    bg_color = "CLASS", bg_alpha = 0.75,
},
}, { bottom = 150, top = 10 });
lpanels:ApplyLayout("n:nil r:nil", "LiteStats", "AnotherLayout")

fix'd!

Clynikal 03-14-11 10:01 PM

Quote:

Originally Posted by Katae (Post 231772)
Code:

lpanels:CreateLayout("LiteStats", {
{  name = "BlackBar",
    anchor_to = "BOTTOM", y_off = 20,
    width = "100%", height = 30,
    bg_color = "0 0 0", bg_alpha = 0.5,
}, -- this is line 291

{  name = "BorderTop", parent = "BlackBar",
    anchor_to = "TOP",
    width = "100%", height = 1,
    bg_color = "CLASS", bg_alpha = 0.75,
},
{  name = "BorderBottom", parent = "BlackBar",
    anchor_to = "BOTTOM",
    width = "100%", height = 1,
    bg_color = "CLASS", bg_alpha = 0.75,
},
}, { bottom = 150, top = 10 });
lpanels:ApplyLayout("n:nil r:nil", "LiteStats", "AnotherLayout")

fix'd!

Thanks for the fast reply! But I'm still having issues T_T After I placed the code in and fired up WoW LitePanels doesn't show up at all. I figured I may have goofed somewhere in the layout.lua file so I did a clean install of LitePanels and tried out your fixed code again. Nothing. LiteStats shows up just fine and is working perfectly but LitePanels doesn't seem to want to show up.

tldr; Tried out the code yet LitePanels refuses to show up on my UI.

Katae 03-14-11 11:05 PM

should be:
lpanels:ApplyLayout(nil, "LiteStats", "AnotherLayout")

missed that bit

undert819 04-13-11 04:19 AM

Hi,man. I've just get to know this Addon.And I think I'll like it.
But here's some questions I want to ask:
I used to use the code down here as a single Addon ,to creat a button that shows or hide some UIforms.(Like LUI)
Code:

local Minimaphide = CreateFrame("Button", "Minimaphide", UIParent);
Minimaphide:SetWidth(32); Minimaphide:SetHeight(32); Minimaphide:SetPoint("TOPRIGHT",0,-16);
Minimaphide:RegisterForClicks("AnyUp");
Minimaphide:SetScript("OnClick", function() MinimapButton_OnClick() end)
Minimaphide:SetTexture("interface\\AddOns\\LitePanels\\media\\buttontex.tga")
Minimaphide:SetVertexColor (1,1,1,1)
       
function MinimapButton_OnClick()
if (Minimap:IsVisible()) then
HideUIPanel(Minimap);
Minimaphide:SetAlpha(0)
else
ShowUIPanel(Minimap);
Minimaphide:SetAlpha(1)
end
end

Now ,I want to creat a whole new out look with LitePanles.
I want to know if I can add this in to layout.lua of LitePanles.
If it will do , where shall I add?

above this:
Code:

lpanels:CreateLayout("Load For All", {
......

or above this:
Code:

    {
    name = "LT_MM",parent["Minimap"]
    strata = "BACKGROUND", level = 1,
        anchor_to ["TOPRIGHT"],
        anchor_from ["TOPRIGHT"],
        x_off = 0, y_off =-16,
        width = 128, height = 128,
        bg_color = "0 0 0",
        bg_alpha [1],
        gradient = "H",
        gradient_alpha [0],
        tex_file ["interface\\AddOns\\LitePanels\\media\\MiniMap.tga"],
        mouse [true],
        },

Please help !

Katae 04-14-11 01:32 AM

Your code can be standalone, I believe. You can leave it by itself outside of litepanels code.

Nitedeamon 05-10-11 06:03 PM

Gradients
 
Hey I was wondering if there was a way for the vertical gradient to start at the bottom and fade out as it moved upwards into the panel, instead of it starting at the top and fading out as it moves downward into the panel.

Melikae 05-10-11 07:40 PM

I did that with some panels, code for one panel, which is just a black shadowy bar at the bottom of my screen getting more translucent to the top:
Code:

                bg_color = "0,0,0",        gradient_color = "0,0,0",
                bg_alpha = 0.8,                gradient_alpha = 0,

So I guess setting the gradient_alpha to 0 let's the panel fade out in the direction of the gradient (for a panel anchored to the BOTTOM this would then be top).

Switching around the gradient_alpha and bg_alpha should then switch the fading to top-to-bottom...

red8981 05-11-11 12:06 AM

Whats the parent bind i should make for Player's cast bar?
and how do i find out what should i put for "Parent = ?"

Nitedeamon 05-12-11 05:54 AM

Quote:

Originally Posted by Melikae (Post 237041)
I did that with some panels, code for one panel, which is just a black shadowy bar at the bottom of my screen getting more translucent to the top:
Code:

                bg_color = "0,0,0",        gradient_color = "0,0,0",
                bg_alpha = 0.8,                gradient_alpha = 0,

So I guess setting the gradient_alpha to 0 let's the panel fade out in the direction of the gradient (for a panel anchored to the BOTTOM this would then be top).

Switching around the gradient_alpha and bg_alpha should then switch the fading to top-to-bottom...

Thanks a ton for this, worked like a charm....heres a picture of the final product.


red8981 05-26-11 06:40 PM

Hi, I am trying out litepanels which means i am new =P
I am trying to attach a box on to my stance bar and i am using bartender.
what would the parent name be?
and same as dominos, =P
thanks

alpmave 05-30-11 01:06 PM

Quote:

Originally Posted by red8981 (Post 238135)
Hi, I am trying out litepanels which means i am new =P
I am trying to attach a box on to my stance bar and i am using bartender.
what would the parent name be?
and same as dominos, =P
thanks


I´ve reworked my whole Interface with litepanels only a few days ago and made panels for my actionbars as well.

Because my Actionbars are at the bottom of the screen, i anchored the mainpanels to the bottom and positioned it from there using x_off and y_off.
if you want to use borders, you can set the parent of these borders to the main panels.


For example:
My main Panel is named "Mitte" and i have a top border named "MitteBorderUp" and a border at the bottom of "Mitte" named "MitteBorderDown". I set them both "parent_to = "Mitte" and anchored them to TOP/BOTTOM.

Code:

lpanels:CreateLayout("ActionBar",{
        {        name = "Mitte",
                anchor_to = "BOTTOM",
                y_off = 35,
                width = 300,
                height = 55,
                bg_color = "0 0 0",
                bg_alpha = 0.4,
        },
        {        name = "MitteBorderUp", parent = "Mitte",
                anchor_to = "TOP",
                width = "100%",
                height = 1,
                bg_color = "0 0 0",
                bg_alpha = 1,
        },
        {        name = "MitteBorderDown", parent = "Mitte",
                anchor_to = "BOTTOM",
                width = "100%",
                height = 1,
                bg_color = "0 0 0",
                bg_alpha = 1,
        },
        {        name = "MitteRechts", parent = "Mitte",
                anchor_to = "RIGHT",
                --y_off = 200,
                x_off = 150,
                width = 150, height = 55,
        gradient = "H",
        bg_color = "0 0 0", gradient_color = "0 0 0",
        bg_alpha = 0.4, gradient_alpha = 0,
        },
        {        name = "MitteRechtsBorderUp", parent = "MitteRechts",
                anchor_to = "TOP",
                width = "100%",
                height = 1,
                gradient = "H",
                bg_color = "0 0 0", gradient_color = "0 0 0",
        bg_alpha = 0.8, gradient_alpha = 0,
        },
        {        name = "MitteRechtsBorderDown", parent = "MitteRechts",
                anchor_to = "BOTTOM",
                width = "100%",
                height = 1,
                gradient = "H",
                bg_color = "0 0 0", gradient_color = "0 0 0",
        bg_alpha = 0.8, gradient_alpha = 0,
        },
        {        name = "MitteLinks", parent = "Mitte",
                anchor_to = "LEFT",
                --y_off = 200,
                x_off = -150,
                width = 150, height = "100%",
        gradient = "H",
        bg_color = "0 0 0", gradient_color = "0 0 0",
        bg_alpha = 0, gradient_alpha = 0.4,
        },
        {        name = "MitteLinksBorderUp", parent = "MitteLinks",
                anchor_to = "TOP",
                width = "100%",
                height = 1,
                gradient = "H",
                bg_color = "0 0 0", gradient_color = "0 0 0",
        bg_alpha = 0, gradient_alpha = 0.8,
        },
        {        name = "MitteLinksBorderDown", parent = "MitteLinks",
                anchor_to = "BOTTOM",
                width = "100%",
                height = 1,
                gradient = "H",
                bg_color = "0 0 0", gradient_color = "0 0 0",
        bg_alpha = 0, gradient_alpha = 0.8,
        },
}); lpanels:ApplyLayout(nil, "ActionBar")


alpmave 05-30-11 01:10 PM

I have a question regarding scripts in panels.


I want to create a backgroundpanel for my raidframes, but it should only be displayed, when i´m actually in a raid/group.

Does anyone know, if
1. this is possible
2. if it is: how can i reach that goal?


I´m pretty new to the whole lua/wow api world and would be grateful if you have any hints ;)

red8981 05-30-11 02:37 PM

Thanks.
But I am asking for a parent name Q.Q
like you ask for a raid frame, it is the same as my action bars.
I only want it shows up when the acion bar exist.
such thing as stance/pet bar.

Lily.Petal 05-30-11 02:42 PM

Quote:

Originally Posted by red8981 (Post 238418)
Thanks.
But I am asking for a parent name Q.Q
like you ask for a raid frame, it is the same as my action bars.
I only want it shows up when the acion bar exist.
such thing as stance/pet bar.

You would anchor it to "ActionBar" parent. Type /fstack in game and go over your action bars. If you are using Bartender, the action bar itself (not the button) is "BT4Bar1", buttons would be "BT4Button#"; # obviously the number of the button.

zynix 05-30-11 03:06 PM

Quote:

Originally Posted by alpmave (Post 238414)
I have a question regarding scripts in panels.


I want to create a backgroundpanel for my raidframes, but it should only be displayed, when i´m actually in a raid/group.

Does anyone know, if
1. this is possible
2. if it is: how can i reach that goal?


I´m pretty new to the whole lua/wow api world and would be grateful if you have any hints ;)

Should be doable, with a little research!

First, you have to have 2 diffirent scripts for the panel, an OnLoad = function(self).
And a OnEvent = function(self).

In the OnLoad script, you should check if your in a raid:
Code:

-- All the other stuff goes here.
OnLoad = function(self)
  if UnitInRaid("player") or UnitInParty("player") then -- We check if the player is in a raid or party.
    self:Show()
  else -- If we aren't, then we hide the frame.
    self:Hide()
end,

Now, this only does the trick for when you load the AddOn.
So now you have to make it check almost constantly, we could do this with an OnUpdate script, but it costs too many ressources, so we need to use events. Events are something that is triggeret by certain things in WoW:
Fx the "UNIT_HEALTH" event fires when the health level of a unit changes.
But we need an event that fires, when the player enters or leaves a group or raid.

I can't find it right now, but you could search around this page and check the events.

But when you've found the event, you need to make your panel check for the event, this is done in the OnLoad script:
So, we take the code from above, and alter it to this:
Code:

-- All the other stuff goes here.
OnLoad = function(self)
  self:RegisterEvent("THE_EVENT_YOU_HAVE_FOUND") -- Remember, spaces are equal to _ and everything is in CAPS!
  if UnitInRaid("player") or UnitInParty("player") then -- We check if the player is in a raid or party.
    self:Show()
  else -- If we aren't, then we hide the frame.
    self:Hide()
end,

And then we have to make it do something in the OnEvent script:

Code:

-- The usual stuff, like before
OnEvent(self, event, ...)
  if (event == "THE_EVENT_YOU_HAVE_FOUND") and (select(1, "THE_EVENT_YOU_HAVE_FOUND") == "player") then
    if self:IsShown() then
      self:Hide()
    else
      self:Show()
    end
  end
end,

Something like that, though I'm not sure about the OnEvent part

Hope it helps, good hunting! :)

red8981 05-30-11 05:33 PM

Quote:

Originally Posted by Lily.Petal (Post 238422)
You would anchor it to "ActionBar" parent. Type /fstack in game and go over your action bars. If you are using Bartender, the action bar itself (not the button) is "BT4Bar1", buttons would be "BT4Button#"; # obviously the number of the button.

when i mouseover it with /fstack, it give me MultiBarLeftButton3, I guess the bar name is, "MultiBarLeft"?

Lily.Petal 05-30-11 06:36 PM

Quote:

Originally Posted by red8981 (Post 238442)
when i mouseover it with /fstack, it give me MultiBarLeftButton3, I guess the bar name is, "MultiBarLeft"?

If you're using Bartender, ALL the bars will Be "BT4Bar#".

red8981 05-31-11 11:58 AM

How about Dominos?
Bartender doesnt have a totem bar, or rather ugly :(
So, I think i will be using dominos, or is there a lite totem bar replacement?

nelothi 05-31-11 12:10 PM

Quote:

Originally Posted by red8981 (Post 238486)
How about Dominos?
Bartender doesnt have a totem bar, or rather ugly :(
So, I think i will be using dominos, or is there a lite totem bar replacement?

check out Yet Another Totem Addon (YATA). its very nice. the best part about it is that you only need to select the totem out of the drop down (or up) list, and it selects and casts it. gone are the days of 3 click totem drops.

red8981 06-02-11 06:07 PM

Quote:

Originally Posted by nelothi (Post 238490)
check out Yet Another Totem Addon (YATA). its very nice. the best part about it is that you only need to select the totem out of the drop down (or up) list, and it selects and casts it. gone are the days of 3 click totem drops.

Err, I can not find this addon, any link?

Fiercy 06-02-11 06:09 PM

Quote:

Originally Posted by red8981 (Post 238641)
Err, I can not find this addon, any link?

http://wow.curse.com/downloads/wow-a...ails/yata.aspx

I prefer TotemTimers. Check it out as well :P

Fiercy 06-02-11 06:11 PM

Textured Gradient Effect?
 
Hello, I hope someone can help me with this :3

I'm trying to copy an effect from a UI i recently came across but they use KGpanels (which i don't like for minimalist pov) and I'm trying to replicate this effect:

Note: There is a chiseled textured combined with a gradient with slight alpha. Is this possible to replicate in LPanels?

Anyone have any ideas? That is of making a texture become a gradient's bg.

So far this doesn't work (ignore how messy it is, i was trial and error testing):
Code:

{
        name = "UIF_BL",
        anchor_to = "BOTTOMLEFT", parent = "UIParent",
        width = 504, height = 132,
        x_off = 3, y_off = 8,
        gradient = "V", gradient_color = "CLASS",  flip_v = false, flip_h = true,
        strata = "BACKGROUND", level = 0,
        --tex_file = "Interface\\AddOns\\Ferous Media\\StatusBars\\Chisel.tga",
        --Ex: {left,right,top,bottom} or {ULx,ULy,LLx,LLy,URx,URy,LRx,LRy}
        --tex_coord = {0, 0, 0, 1, 1, 0, 1, 1},
        border = "Interface\\AddOns\\Ferous Media\\Borders\\Pixel.tga",
        bg_blend = "DISABLE",
        border_color = "0 0 0", border_size = 1,
        mouse =false,
        gradient_alpha = 0,
        bg_alpha = 1,
        inset={top=90,bottom=0,left=0,right=0}       
    }

Anything would be helpful, thanks for reading

Unkn 06-02-11 09:04 PM

4 Attachment(s)
Now I am curious if I can apply a gradient to a texture. Testing... I'll get back to you.


Edit:
Okay tested... And here is the easiest way I came up with. I made a gradient texture and added some chop to it.... ie used one of my random brushed in gimp and made the choppy pattern on it.

Code:

{ name = "tester", -- test
        anchor_to = "CENTER", anchor_to = "CENTER",
        y_off = 0, height = "20%", width = "40%", level = 0,
        tex_file = "testtexture.tga",
    bg_color = {0,0,1}, bg_alpha = 0.45, -- was playing with different alphas for the screenshots
},
{ name = "tester2", -- test
        anchor_to = "CENTER", anchor_to = "CENTER",
        y_off = 0, height = "20%", width = "40%", level = 0,
        bg_color = {0,0,0}, bg_alpha = 0,
        border = "SOLID", border_color = {0,0,0},
},

Same effect, half the work? And you could easily just put the border on the main frame. I just kept it apart so I wouldn't mistakenly delete any of it :)

I've got the texture available if you'd like to use it, its in the zip file.

Fiercy 06-02-11 10:06 PM

Quote:

Originally Posted by Unkn (Post 238651)
Now I am curious if I can apply a gradient to a texture. Testing... I'll get back to you.


Edit:
Okay tested... And here is the easiest way I came up with. I made a gradient texture and added some chop to it.... ie used one of my random brushed in gimp and made the choppy pattern on it.

Code:

{ name = "tester", -- test
    anchor_to = "CENTER", anchor_to = "CENTER",
    y_off = 0, height = "20%", width = "40%", level = 0,
    tex_file = "testtexture.tga",
    bg_color = {0,0,1}, bg_alpha = 0.45, -- was playing with different alphas for the screenshots
},
{ name = "tester2", -- test
    anchor_to = "CENTER", anchor_to = "CENTER",
    y_off = 0, height = "20%", width = "40%", level = 0,
    bg_color = {0,0,0}, bg_alpha = 0,
    border = "SOLID", border_color = {0,0,0},
},

Same effect, half the work? And you could easily just put the border on the main frame. I just kept it apart so I wouldn't mistakenly delete any of it :)

I've got the texture available if you'd like to use it, its in the zip file.

Wow nicely done! Ty so much!! I thought of having overlapped frames like you did here, but idk why i didn't test it. Ty for the tex too :D:D

Unkn 06-02-11 10:42 PM

sure thing chicken wing


Yes I'm hyper... gogo Monster!!

Zpartan72 09-30-11 07:52 PM

RazerNaga
 
Hey guys really love this addon just starting to get used to anchoring panels to my action bars..
Then I had to go buy a Razer Naga. I had no problem setting the frames to anchor my Bartender Actionbars, with a little bordered black box around my action bar. I used this code sorry if any of this is horrible but it worked for me:

{ name = "Action",
anchor_frame = "BT4Bar1Overlay",
y_off = 1,
width = "100%",
height = "101%",
bg_color = "0 0 0",
bg_alpha = 1,
strata = "LOW",
border = "Interface\\AddOns\\Ferous Media\\Borders\\fer8",
border_color = ".45 .45 .45",
border_size = 18,
inset = 2,
},

But for the life of me I cant figure out how to anchor to my RazerNaga Addon Bars? I know its similar to dominos but I couldn't get it to anchor to Dominos either. Anyone know of the bar names I need to Anchor to? Or where I would find the name of the bars I'd like to anchor to?
I tried /fstack I get this:

<4> table:1F393DE8
<4>ActionButton1
<2> table:29FE3588
<1> table:29FE3560
<0>World Frame
<0> UI Parent

Unkn 10-01-11 02:36 AM

I just anchor to the action button and adjust the size from there if I want them to be moveable with the action bars. If not I'd suggest you just size them correctly and put them where you want. Then you can just position the buttons on top of the graphic you created.

Example:

Parent = "ActionButton1"

Unkn 10-20-11 08:27 PM

1 Attachment(s)
Yay for fun things to do with LitePanels :)



Boss Icon Toggle Button for the World Map
lua Code:
  1. lpanels:CreateLayout("BossButtonToggleMod", {
  2. {name = "BossButtonToggle",  parent  = "WorldMapFrame", --Button
  3.     anchor_to = "BOTTOM", y_off = 10, x_off = 0,
  4.     width = 125, height = 20, strata = "HIGH",  level = 25,
  5.     bg_color = {0,0,0}, bg_alpha = .4,
  6.     border = "SOLID", border_size = 2, border_color = {0,0,0},
  7.     text = {
  8.         -- "Click to Toggle Boss Icons"
  9.             {    string = "Toggle Boss Icons", anchor_to = "Center", y_off = 0,
  10.                 shadow=1, font = "Fonts\\FRIZQT__.TTF", size=10,
  11.             },
  12.         },
  13.         OnClick = function(self, b)
  14.             if b == "LeftButton" then
  15.                 if WorldMapBossButtonFrame:IsShown() then
  16.                         WorldMapBossButtonFrame:Hide()
  17.                 else
  18.                         WorldMapBossButtonFrame:Show()
  19.                 end
  20.             end
  21.         end,
  22.     },
  23.     })
  24.  
  25. lpanels:ApplyLayout(nil, "BossButtonToggleMod")

Katae 11-25-11 09:18 PM

To any interested users of Litepanels/Litestats,

I've long since stopped subscribing to WoW in favor of school and employment, so development of my addons have noticeably fallen by the wayside. I've created a Git repository for anyone interested in fixing bugs or updating compatibility with current patches.

Fork me @ Github

Aerilyn 01-11-12 04:42 PM

Gloss frames?
 
I just stumbled across this addon and I think it's awesome! :D

I was wondering if it's possible to add a gloss look to a panel. I know how to create the panels itself but just wondering if there's a way to add a gloss look to it.

Thanks!

Unkn 01-11-12 06:03 PM

Grab some glossy textures and start layering "panels" would be your best bet - and easiest to tweak to get your desired result. I use status bar textures for most of my panels. I am sure you could do something similar to get the gloss feel to it.

There are quite a few UI compilations that use litepanels or kgpanels you could probably get an idea of where to start from there.

Aerilyn 01-12-12 12:16 PM

Gloss
 
Quote:

Originally Posted by Unkn (Post 250847)
Grab some glossy textures and start layering "panels" would be your best bet - and easiest to tweak to get your desired result. I use status bar textures for most of my panels. I am sure you could do something similar to get the gloss feel to it.

There are quite a few UI compilations that use litepanels or kgpanels you could probably get an idea of where to start from there.

Thanks for the suggestion but I've already tried that before posting. The art files don't show up at all. I was using the glass textures from Arkive UI. I've tried looking for other compilations that use Lite Panels but I've only found a couple. If you know of compilations that I can reference, I would be grateful if you would link them.

Unkn 01-12-12 04:54 PM

For textures:
SharedMedia: Renaitre --- there is actually a texture in here called "gloss" that you could use.
Ferous Media Pack

The files should show up if they are in the right format & you made the layout correctly. You could try and use the texture that looks like it has gloss or actually add a "gloss" texture as a second frame on top of the main one. That is generally how people get glossy looking textures on different elements without hiding to much of the panel/button/whatever behind them

I'm looking for an interface with a glossy look to it. Don't you know you cant find one when you go looking :)

Found caelUI, which is the main one I was thinking of, since it does gloss very well without being overwhelming.

Aerilyn 01-12-12 06:15 PM

Gloss
 
Quote:

Originally Posted by Unkn (Post 250938)
For textures:
SharedMedia: Renaitre --- there is actually a texture in here called "gloss" that you could use.
Ferous Media Pack

The files should show up if they are in the right format & you made the layout correctly. You could try and use the texture that looks like it has gloss or actually add a "gloss" texture as a second frame on top of the main one. That is generally how people get glossy looking textures on different elements without hiding to much of the panel/button/whatever behind them

I'm looking for an interface with a glossy look to it. Don't you know you cant find one when you go looking :)

Found caelUI, which is the main one I was thinking of, since it does gloss very well without being overwhelming.

I've tried to insert a couple of textures that had the gloss look I wanted but they didn't show up correctly. All I saw was a darker frame or the frame disappeared completedly. Below is a snippet of the code that I was using:

{ name = "LeftChat", --4---------------------------------------
anchor_to = "BOTTOMLEFT",
width = 320, height = 160,
bg_color = {0,0,0}, bg_alpha = 0.65,
tex_file = "glosstex",
},

All the textures I used were put in the media folder of Lite Panels and I've tried fer31, the glass textures for Arkive UI, and a couple of others and I couldn't get any of them to work correctly.

I have no doubt that I'm doing it wrong since I'm not familiar with lua but that doesn't stop me from tinkering with it ;)

Thanks for your help and suggestions. I really appreciate it. I was hoping that someone in the community would've made glossy frames using Lite Panels.

Unkn 01-12-12 06:43 PM

Okay so this might be your problem. Are you moving the file you are trying to use the the litepanels media folder? That folder is located in the Litepanels Addon folder, it should be empty or might have a couple files in it already.

If yes... then
lua Code:
  1. tex_file = "glosstex",
... like in your example will work if the file is in correct format.

If no... then you need to make sure the path is correct.
Example:
lua Code:
  1. tex_file = "Interface\\Addons\\oUF_Karma\\media\\Statusbar.tga",
  2. tex_file = "Interface\\Addons\\FOLDER\\TEXTURE",

That could explain your black box problem.

One of my panels looks like:

lua Code:
  1. {   name = "CenterGraphic",
  2.     anchor_to = "BOTTOM", anchor_from = "BOTTOM",
  3.     y_off = 10, x_off = 0,
  4.     height = 100, width = "25%", level = 1,
  5.     tex_file = "Interface\\Addons\\oUF_Karma\\media\\Statusbar.tga",
  6.     bg_color = {.15,.15,.15}, bg_alpha = 1,
  7.     border = "SOLID", border_size = 2, border_color = {0,0,0}, border_alpha = 1,
  8. },

Aerilyn 01-13-12 01:51 PM

Gloss
 
Yes, they are in the media folder within Lite Panels. I used your code and installed OUF & OUF_Karma to fully test and it works perfectly. I put the texture within the media folder of Lite Panels and it works correctly. I think the problem with my code is that I need to tinker with the color coding for the texture and playing with different textures. I found the one that I like and it's as close as I can get to what I want until I have time to find another texture.

Thanks for all of your help! :D

Unkn 01-13-12 04:40 PM

You can also do "CLASS" instead of {#,#,#} for your colors anywhere in the layout btw.

Glad its working for you. Let me know if I can be of anymore help.

Skynniman 01-16-12 04:01 PM

Lite problem
 
Hi,

Nowdays I edit my minimap with Litepanels but I've got a little problem. I'm trying to make disappear 2 bars when I enter in combat and appear again when get out of combat. I'm not really good in Lua so I found the code copy/paste it, and when I use it one time, it work really good, but when I use it twice it make all my frame disapear =/

Here you can fin my layout.lua : http://pastebin.com/4Une5Rpe

Can someone help me ?

Unkn 01-16-12 05:09 PM

Quote:

Originally Posted by Unkn (Post 207847)
............

OOC and InCombat Panels

Code:

{        name = "Tester1", --in combat show
        anchor_to = "CENTER", y_off = 0, x_off = 0,
        width = 100, height = 100, strata = "background",
        bg_color = {0,0,0}, bg_alpha = 1,
        OnLoad=function(self)
                self:RegisterEvent'PLAYER_REGEN_ENABLED'
                self:RegisterEvent'PLAYER_REGEN_DISABLED'
                self:Hide()
        end,
        OnEvent=function(self) ToggleFrame(self) end
},
{        name = "Tester2",  --NOT in combat show
        anchor_to = "CENTER", y_off = 200, x_off = 200,
        width = 100, height = 100, strata = "background",
        bg_color = {0,0,0}, bg_alpha = 1,
        OnLoad=function(self)
                self:RegisterEvent'PLAYER_REGEN_ENABLED'
                self:RegisterEvent'PLAYER_REGEN_DISABLED'
                self:Show()
        end,
        OnEvent=function(self) ToggleFrame(self) end
},

This was me testing to move some elements when I was in combat or out. The panels "move". Can do the same thing for different color depending on combat state. Just place the panels - same width and height - in exact same place and make them different colors.

Quoting myself... oh yeah...

I would suggest doing something similar with your panels. Just a toggle for in/out combat. Let me know how if it works I may be able to tweak it for you.

Skynniman 01-16-12 05:23 PM

OMG, I'm a real noob --'

I don't how I haven't seen you're post...
But Thanks for the quickly reply I wil test on my side too

Skynniman 01-16-12 05:43 PM

I read my code again, I've got the same as you, ( exept for my wish to make two frame disappear ) and I really don't understand why , 1 disapear is good, ans 2 make alle my panels bug =/

EDIT : I don't have paste the write layout I re upload the right lua

EDIT 2 : http://pastebin.com/kXdqsyxF but it's the same when "Minimap_location" and "Minimap_tracking" have the code when I enter in combat all my frames disapear

Unkn 01-16-12 07:27 PM

Its not the same. I just use a toggle frame vs show/hide on event. I fixed it and should have a working copy below. Try it out. It is your entire layout. I just checked to make sure it worked correctly multiple times with test panels. It should work to do the following - show intended panels (ie Minimap_location and Minimap_tracking) unless you are in combat then those 2 panels will hide.

lua Code:
  1. lpanels:CreateLayout("Minimap", {
  2.         -- Bordure minimap int
  3.         {       name = "Minimap_border",
  4.                 parent = "Minimap", anchor_to = "TOP",
  5.                 height = "100%", width = "100%" , bg_alpha = 0,
  6.                 border = "SOLID", border_color = "0 0 0",
  7.                 border_alpha = 0.5, level = 99, inset = -2.5
  8.         },
  9.         -- barre supérieur carte
  10.         {       name = "Minimap_location",
  11.                 anchor_frame = "Minimap", anchor_to = "TOPLEFT",
  12.                 height = 11, width = "100%",
  13.                 bg_alpha = 0.3, level = 99,
  14.     OnLoad=function(self)
  15.         self:RegisterEvent'PLAYER_REGEN_ENABLED'
  16.         self:RegisterEvent'PLAYER_REGEN_DISABLED'
  17.         self:Show()
  18.     end,
  19.     OnEvent=function(self) ToggleFrame(self) end
  20.         },    
  21.         {       name = "Minimap_location_border",
  22.                 parent = "Minimap_location", anchor_to = "BOTTOM",
  23.                 width = "100%", height = 1, y_off = -1,
  24.                 bg_alpha = 0.5,
  25.         },
  26.        
  27.         -- Barre inférieur carte
  28.         {       name = "Minimap_tracking",
  29.                 anchor_frame = "Minimap",
  30.                 height = 18, width = "100%",
  31.                 bg_alpha = 0.3, level = 99,
  32.     OnLoad=function(self)
  33.         self:RegisterEvent'PLAYER_REGEN_ENABLED'
  34.         self:RegisterEvent'PLAYER_REGEN_DISABLED'
  35.         self:Show()
  36.     end,
  37.     OnEvent=function(self) ToggleFrame(self) end
  38.                
  39.         },
  40.         {       name = "Minimap_tracking_border",
  41.                 parent = "Minimap_tracking", anchor_to = "TOP",
  42.                 width = "100%", height = 1, y_off = 1,
  43.                 bg_alpha = 0.5,
  44.         },
  45.  
  46.         -- barre inférieur extérieur carte
  47.         {       name = "Minimap_stat",
  48.                 parent = "Minimap_tracking", anchor_to = "BOTTOM",
  49.                 border = "SOLID", border_color = "0 0 0",
  50.                 border_alpha = 0.5, level = 0, inset = 1,
  51.                 height = 15, width = 140, y_off = -17.5,
  52.                 bg_alpha = 0.3, level = 99,
  53.                
  54.         }
  55. })
  56.  
  57. lpanels:CreateLayout("Afker", {
  58.     {    name = "AFK", anchor_to = "TOP", y_off = -350,
  59.         bg_alpha = 0.5, width = 200, height = 50,
  60.         border = "SOLID", border_color = "1 0.3 0.3",
  61.         text = {
  62.         -- "YOU ARE AFK!"
  63.             {    string = "Tu es AFK !", anchor_to = "TOP", y_off = -10,
  64.                 shadow=1, font = "Fonts\\FRIZQT__.TTF", size=14,
  65.             },
  66.             -- "0:00" TIMER
  67.             {    string=function()
  68.                     if afk_timer then
  69.                         local secs = mod(time() - afk_timer, 60)
  70.                         local mins = floor((time() - afk_timer) / 60)
  71.                         return format("%s:%02.f", mins, secs)
  72.                     end
  73.                 end, update=0.1,
  74.                 shadow=1, font = "Fonts\\FRIZQT__.TTF", size=16,
  75.                 anchor_to = "CENTER", y_off = -7, color = "1 0.3 0.3"
  76.             }
  77.         },
  78.         OnLoad = function(self)
  79.             self:RegisterEvent("PLAYER_FLAGS_CHANGED")
  80.             self:Hide()
  81.         end,
  82.         OnEvent = function(self)
  83.             if UnitIsAFK("player") and not afk_timer then
  84.                 self.text2:SetText("0:00")
  85.                 afk_timer = time()
  86.                 self:Show()
  87.             elseif not UnitIsAFK("player") then
  88.                 self:Hide()
  89.                 afk_timer = nil
  90.             end
  91.         end,
  92.         OnClick = function(self, b)
  93.             self:Hide()
  94.             if b == "LeftButton" then SendChatMessage("", "AFK") end
  95.         end,
  96.         OnEnter = function(self) self.bg:SetTexture(.1,.1,.1,.5) end,
  97.         OnLeave = function(self) self.bg:SetTexture(0,0,0,.5) end
  98.     }
  99. })
  100.  
  101. lpanels:ApplyLayout(nil, "Minimap", "Afker")

Skynniman 01-17-12 12:29 PM

I've just try you're code but it the same, all my panel disapear =/

Skynniman 01-17-12 03:07 PM

Solved : The problem were not the code but the parents... Thanks you for your help =) :banana:

Unkn 01-17-12 06:04 PM

Yay! Glad its working for you now

Unkn 09-08-12 01:14 PM

For those interested. LitePanels is still fully functioning in patch 5.0.4 pre MoP and should continue to work in MoP.

LiteStats works fine if you disable the "Talents" module in the config.lua for that addon.

:)

maven79 04-30-13 08:40 AM

Function for repeated panels
 
Maintenance at the moment so wanted to play with my layout a bit. Awesome addon btw.

For an example I will use a simple 1px class-colored border on the minimap:
Lua Code:
  1. lpanels:CreateLayout("Minimap_border",{
  2.     {   name="Minimap_border",parent="Minimap",strata="BACKGROUND",level=4,anchor_to="TOP",width="100%",height="100%",bg_color="CLASS",bg_alpha=1,inset=-1},
  3. }
  4. lpanels:ApplyLayout(nil,"Minimap_border")

And the same one with a black border.

Lua Code:
  1. lpanels:CreateLayout("Minimap_border",{
  2.     {   name="Minimap_border",parent="Minimap",strata="BACKGROUND",level=4,anchor_to="TOP",width="100%",height="100%",bg_color="0 0 0",bg_alpha=1,inset=-1},
  3. }
  4. lpanels:ApplyLayout(nil,"Minimap_border")

So what I would like is a means to turn those 2 simple border lines into a function so I then simply say something like border_class("somenewframe") or border_black("somenewframe") and not have to repeat all that lua for each of dozens of frames, and more importantly, just tweak one line when I want to add a shadow, or change a detail for every frame with one edit. Hope that makes sense. Could you provide any samples for making those functions within the lua file if it is possible? If the functions won't work, perhaps just some variables would work to simplify global changes to all panels? Thanks!

Katae 05-01-13 12:04 AM

@maven

Forgive me, I haven't coded Lua for over a year and I'm doing this on my phone. But perhaps something along these lines?

Lua Code:
  1. function border(parent, color)
  2.   return {
  3.       name = parent .. "_border",
  4.       parent = parent,
  5.       anchor_to = "TOP",
  6.       bg_color = color or "CLASS",
  7.       bg_alpha = 1,
  8.       width = "100%",
  9.       height = "100%",
  10.       strata = "BACKGROUND",
  11.       level = 4,
  12.       inset = -1
  13.   }
  14. end
  15. lpanels:CreateLayout("Minimap_border", border("Minimap"))

Should use "CLASS" if you omit the color parameter.

gmarco 05-19-13 01:53 AM

OnLeave problem
 
Hi, I have used LitePanels in a simple way for long time ...

Now I'd like to use it trying to make something more complex, but I am having some difficulties:

Lua Code:
  1. lpanels:CreateLayout("Back2", {
  2.     {   name = "P1", anchor_to = "BOTTOM", x_off = 0, y_off = 4,
  3.         bg_alpha = 0.5, width = 460, height = 120,
  4.         border = "SOLID", border_color = "CLASS",
  5.     },
  6.    
  7.     {   name = "P2",
  8.         anchor_to="BOTTOMLEFT", anchor_from="BOTTOMRIGHT", anchor_frame = "P1",
  9.         x_off = 2, y_off = 0,
  10.         bg_alpha = 0.5, width = 115, height = 120,
  11.         border = "SOLID", border_color = "CLASS",
  12.         OnLoad  = function(self) self:SetAlpha(0) end,
  13.         OnEnter = function(self)
  14.             self:SetAlpha(1)
  15.             -- BT4Bar3:Show()
  16.         end,
  17.         OnLeave = function(self)
  18.             print( "DEBUG: The mouse is over " .. GetMouseFocus():GetName())
  19.             if GetMouseFocus():GetParent() ~= self then
  20.                 self:SetAlpha(0)
  21.             end
  22.         end,
  23.     },
  24.    
  25. } )

The problem is, as pointed out in this forum earlier, that I'd like to make P2 panel show and hide on the event Enter and Leave.
But I have filled the P2 panel with a 3x3 bar of BT4 and when I hovering over it the P2 panel disappear if I use a simple self:SetAlpha(0) condition.

Also the solution I found in this thread, as posted above, isn't working.

Any idea ? Thanks.

P.s.
This is really a great addon.

gmarco 05-19-13 12:38 PM

Solved, thanks to other answer in this forum in this way:

Lua Code:
  1. lpanels:CreateLayout("Back2", {
  2.     {   name = "P1", anchor_to = "BOTTOM", x_off = 0, y_off = 4,
  3.         bg_alpha = 1, width = 460, height = 122,
  4.         border = "SOLID", border_color = "CLASS",
  5.     },
  6.    
  7.     {   name = "P2", parent = "BT4Bar10",
  8.         anchor_to="BOTTOMLEFT", anchor_from="BOTTOMRIGHT", anchor_frame = "P1",
  9.         x_off = 2, y_off = 0,
  10.         bg_alpha = 1, width = 115, height = 122,
  11.         border = "SOLID", border_color = "CLASS",
  12.     },
  13.  
  14.     {   name = "P3", parent = "BT4Bar9",
  15.         anchor_to="BOTTOMRIGHT", anchor_from="BOTTOMLEFT", anchor_frame = "P1",
  16.         x_off = -2, y_off = 0,
  17.         bg_alpha = 1, width = 115, height = 122,
  18.         border = "SOLID", border_color = "CLASS",
  19.     },
  20.    
  21. } )

Without parenting with BT4 bars I think it is impossible.

Rakkerzero 06-29-13 12:23 PM

I've a couple of panels that i want to hide in Pet Battles. How can do that?

Fizzlemizz 06-29-13 01:30 PM

Quote:

Originally Posted by Rakkerzero (Post 280559)
I've a couple of panels that i want to hide in Pet Battles. How can do that?

You need to have the two events PET_BATTLE_CLOSE and PET_BATTLE_OPENING_START registered for a frame (one you want to hide). And assuming they're not secure frames then in its OnEvent function:

Code:

if event == "PET_BATTLE_CLOSE" then
        if self.PetBattleHidden then
                self.PetBattleHidden = nil
                self:Show();
                OtherPanel:Show()
                -- Show other panels
                return
        end
end
if not self:IsVisible() then return; end
if event == "PET_BATTLE_OPENING_START" then
        self.PetBattleHidden = true
        self:Hide()
        OtherPanel:Hide()
        -- Hide other panels
end


Rakkerzero 06-29-13 02:51 PM

Quote:

Originally Posted by Fizzlemizz (Post 280562)
You need to have the two events PET_BATTLE_CLOSE and PET_BATTLE_OPENING_START registered for a frame (one you want to hide). And assuming they're not secure frames then in its OnEvent function:

Code:

if event == "PET_BATTLE_CLOSE" then
        if self.PetBattleHidden then
                self.PetBattleHidden = nil
                self:Show();
                OtherPanel:Show()
                -- Show other panels
                return
        end
end
if not self:IsVisible() then return; end
if event == "PET_BATTLE_OPENING_START" then
        self.PetBattleHidden = true
        self:Hide()
        OtherPanel:Hide()
        -- Hide other panels
end


I'm not getting it. I'm not familiar with LUA scripting. I got the following panelframe which i want to hide in pet battles:
Code:

lpanels:CreateLayout("Button Bar", {
        -- Buttonbar background
        {        name = "Buttonbar",
                width = "783", height = 86,
                y_off = 7, x_off = "552",
                bg_color = "0.1 0.1 0.1", bg_alpha = 1,
                level = 4,
        },
                -- Lines around the box
                {        name = "BB_left", parent = "Buttonbar",
                        anchor_to = "LEFT",
                        width = 1, height = 86, x_off = -1,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
                {        name = "BB_right", parent = "Buttonbar",
                        anchor_to = "RIGHT",
                        width = 1, height = 86,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
                {        name = "BB_top", parent = "Buttonbar",
                        anchor_to = "TOP",
                        width = 783, height = 1,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
                {        name = "BB_bottom", parent = "Buttonbar",
                        anchor_to = "BOTTOM",
                        width = 783, height = 1,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
})

Where do i have to put that script you're showing?

Fizzlemizz 06-29-13 11:49 PM

I haven't used LitePanels (so backup your layout file) but a quick look at the docs and I think something like this might work, assuming you want all the panels in this layout to hide and assuming LP parents all subsequent frames to the first in a layout:

Code:

lpanels:CreateLayout("Button Bar", {
        -- Buttonbar background
        {        name = "Buttonbar",
                width = "783", height = 86,
                y_off = 7, x_off = "552",
                bg_color = "0.1 0.1 0.1", bg_alpha = 1,
                level = 4,
                OnLoad = function(self)
                    self:RegisterEvent("PET_BATTLE_OPENING_START")
                    self:RegisterEvent("PET_BATTLE_CLOSE")
                end,
                OnEvent = function(self, event)
                    if event == "PET_BATTLE_CLOSE" then
                            if self.PetBattleHidden then
                                    self.PetBattleHidden = nil
                                    self:Show()
                                    return
                            end
                    end
                    if not self:IsVisible() then return; end
                    if event == "PET_BATTLE_OPENING_START" then
                            self.PetBattleHidden = true
                        self:Hide()
                    end
                end,
        },
                -- Lines around the box
                {        name = "BB_left", parent = "Buttonbar",
                        anchor_to = "LEFT",
                        width = 1, height = 86, x_off = -1,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
                {        name = "BB_right", parent = "Buttonbar",
                        anchor_to = "RIGHT",
                        width = 1, height = 86,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
                {        name = "BB_top", parent = "Buttonbar",
                        anchor_to = "TOP",
                        width = 783, height = 1,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
                {        name = "BB_bottom", parent = "Buttonbar",
                        anchor_to = "BOTTOM",
                        width = 783, height = 1,
                        bg_color = "0.3 0.3 0.3", bg_alpha = 1,
                        level = 5,
                },
})

If it doesn't work, posting in the LitePanles comments page might find someone who can massage the code correctly.


All times are GMT -6. The time now is 11:48 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI