WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   LitePanels (https://www.wowinterface.com/forums/showthread.php?t=54123)

badness 08-04-16 05:48 PM

LitePanels
 
Hey, So I use Lite Panels to make nice panels as the cornerstone of my UI but every since pre-patch the panels have disappeared and I cant seem to get them to show up again. This is the layout I currently use:

Code:

lpanels:CreateLayout("Load For All", {
        -- Create a global layout right here
{  name = "GridDataText",
        strata = "BACKGROUND", level = 0,
                x_off = -1, y_off = 18,
                width = 416, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "GridBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "GridDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 416, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "GridBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "GridDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 416, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "GridBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "GridDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "GridBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "GridDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       

{  name = "ChatPanelDataText",
        strata = "BACKGROUND", level = 0,
                x_off = 416, y_off = 18,
                width = 399, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "ChatPanelBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "ChatPanelDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 399, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "ChatPanelBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "ChatPanelDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 399, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "ChatPanelBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "ChatPanelDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1.1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "ChatPanelBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "ChatPanelDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
{  name = "BarDataText",
        strata = "BACKGROUND", level = 0,
               
                x_off = 816.5, y_off = 18,
                width = 425.5, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "BarBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "BarDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 425.5, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "BarBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "BarDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 425.5, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "BarBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "BarDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "BarBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "BarDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1.1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
{  name = "MinimapDataText",
        strata = "BACKGROUND", level = 0,
                x_off = 1243, y_off = 18,
                width = 150, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "MinimapBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "MinimapDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 150, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "MinimapBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "MinimapDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 150, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "MinimapBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "MinimapDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "MinimapBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "MinimapDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
{  name = "EavesDropDataText",
        strata = "BACKGROUND", level = 0,
                x_off = 1394, y_off = 18,
                width = 247, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "EavesDropBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "EavesDropDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 247, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "EavesDropBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "EavesDropDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 247, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "EavesDropBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "EavesDropDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1.1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "EavesDropBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "EavesDropDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
{  name = "DPSDataText",
        strata = "BACKGROUND", level = 0,
                x_off = 1642, y_off = 18,
                width = 194, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "DPSBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "DPSDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 194, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "DPSBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "DPSDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 194, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "DPSBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "DPSDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "DPSBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "DPSDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
{  name = "ThreatDataText",
        strata = "BACKGROUND", level = 0,
                x_off = 1837, y_off = 18,
                width = 264, height = 149,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "ThreatBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "ThreatDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 264, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
           
    },
        {  name = "ThreatBorderBottom",
        strata = "BACKGROUND", level = 0,
                parent = "ThreatDataText",
                anchor_to = "LEFT", anchor_from = "BOTTOMLEFT",
                x_off = 0, y_off = 0,
                width = 264, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
     
    },
        {  name = "ThreatBorderLeft",
        strata = "BACKGROUND", level = 0,
                parent = "ThreatDataText",
                anchor_to = "LEFT", anchor_from = "LEFT",
                x_off = 0, y_off = 0,
                width = 1.1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
          {  name = "ThreatBorderRight",
        strata = "BACKGROUND", level = 0,
                parent = "ThreatDataText",
                anchor_to = "RIGHT", anchor_from = "RIGHT",
                x_off = 0, y_off = 0,
                width = 1, height = 149,
                bg_color = "0 0 0", bg_alpha = 5,       
  },       
{  name = "LiteStatsDataText",
        strata = "BACKGROUND", level = 0,
               
                x_off = 0, y_off = 0,
                width = 2100, height = 16,
                bg_color = "0 0 0", bg_alpha = 0.5,
             
    },
        {  name = "LiteStatsBorderTop",
        strata = "BACKGROUND", level = 0,
                parent = "LiteStatsDataText",
                anchor_to = "LEFT", anchor_from = "TOPLEFT",
                x_off = 0, y_off = 0,
                width = 2100, height = 1,
                bg_color = "0 0 0", bg_alpha = 5,
 },
})

Can anyone help me out to get them showing again?

Seerah 08-04-16 06:20 PM

My absolute guess is that LitePanels uses the :SetTexture() method to set the solid color of your panels. As of the pre-patch, you can no longer pass r,b,g values to SetTexture (since it has been changed to accept the FileID numbers). Open up the LitePanels addon and find SetTexture and change that to SetVertexColor.

Miiru 08-05-16 12:08 AM

You can also change SetTexture to SetColorTexture(r,g,b,a).

badness 08-05-16 04:29 AM

I changed them and still wasn't able to get them to show, do you have to change setcolor too in order to pass r,g,b?

Fizzlemizz 08-05-16 10:26 AM

If you changed the line (around line 183):
Code:

panel.bg:SetTexture(not strmatch(f.tex_file,"[/\\]") and self.media..f.tex_file or f.tex_file)
to use SetVertexColor then that's the line that actualy gives the region the image to use. Change it back to SetTexture.

Seerah 08-05-16 11:36 AM

Oh that's right. In addition to changing which method to use to set the color, you have to explicitly set a texture now, too.

badness 08-05-16 11:54 AM

Quote:

Originally Posted by Fizzlemizz (Post 317499)
If you changed the line (around line 183):
Code:

panel.bg:SetTexture(not strmatch(f.tex_file,"[/\\]") and self.media..f.tex_file or f.tex_file)
to use SetVertexColor then that's the line that actualy gives the region the image to use. Change it back to SetTexture.

Made the change and my layout still isn't showing, its not giving me a lua error either

Fizzlemizz 08-05-16 01:23 PM

The SetVertexColor (or SetTexture if you're starting with a fresh copy of the addon) at lines 206 and 211 should be changed to SetColorTexture as your layout doesn't specificlly set any textures.

The addon probably needs a bit of a rework if it's to be made more generic again as noted by Seerah and Miiru.

badness 08-05-16 03:18 PM

Quote:

Originally Posted by Fizzlemizz (Post 317505)
The SetVertexColor (or SetTexture if you're starting with a fresh copy of the addon) at lines 206 and 211 should be changed to SetColorTexture as your layout doesn't specificlly set any textures.

The addon probably needs a bit of a rework if it's to be made more generic again as noted by Seerah and Miiru.

Hey thanks alot! those last 2 changes did the trick :D. Quick question though what kind of rework would you say is need?....cause I messaged the author couple weeks ago and he said he would be happy to keep the addon updated even though he doesn't play anymore but then he kinda went cold on me and never messaged me back.

Fizzlemizz 08-05-16 03:43 PM

They may be the only changes needed for now assuming SetColorTexture does both set a plain texture and colour it, as well as colouring a texture that has an image set via SetTexture. Otherwise the change would need be a bit more extensive but that would need some testing.

Others may know the answer.

badness 08-05-16 05:35 PM

ahh ok. I have 2 other addons that broke since pre-patch and I'm very interested in trying to get them fixed and maintained. I'm not very versed at lua but I can find my way around and would be more than willing to learn and keep them update. I was wondering if you could lend me hand in where to start?

Fizzlemizz 08-05-16 05:52 PM

Post the problems/errors and I'm sure if someone can help they will. Probably best to make new threads so others using the addons might benefit.

http://www.wowinterface.com/forums/s...ad.php?t=53248


All times are GMT -6. The time now is 01:15 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI