Thread Tools Display Modes
06-01-10, 08:18 PM   #1
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Thumbs up LitePanels Experts

Calling all LitePanels users:

Looking at Katae's AFK modish thing, I'm trying to create a panel that acts as a button which can enable/disable another panel. If you have experience with LP, shoot me a PM please
  Reply With Quote
06-01-10, 09:35 PM   #2
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
All frames created by LitePanels are given a global reference called LP_name. name is the name attribute of your panel. Set an OnClick handler on your frame and show/hide LP_name in the handler.
  Reply With Quote
06-02-10, 12:18 AM   #3
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Code:
{       name = "Toggle", --toggle for corner graphic
	anchor_to = "CENTER", y_off = 200, x_off = 0,
	width = "5%", height = "5%", strata = "LOW", bg_color = {0,0,0},
	bg_alpha = .45, border = "SOLID", 
	border_size = 4, border_color = "CLASS", border_alpha = 0.75,
	OnClick = function(self, button)
		if button == "LeftButton" then
			if myframe:IsShown() then
				myframe:Hide()
			else
				myframe:Show()
			end
		end
	end
},
myframe is the name of your frame ... in my case its LP_CornerGraphic ... remember litepanels frame is LP_yournamehere.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 05:32 AM   #4
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Many thanks, Unkh. One question I have though; I haven't really delved into LitePanels as much as other addons, but what are the possible options you could set for Border and Border_Color? just "SOLID" and "CLASS"?

Thanks!
  Reply With Quote
06-02-10, 05:18 PM   #5
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Originally Posted by Politig View Post
Many thanks, Unkh. One question I have though; I haven't really delved into LitePanels as much as other addons, but what are the possible options you could set for Border and Border_Color? just "SOLID" and "CLASS"?

Thanks!
If you find a border texture you like you can use that. Something like the following.

Code:
{ name = "Button2",  
	anchor_to = "CENTER", y_off = 0, x_off = 0,
	width = "10%", height = "10%", strata = "LOW", bg_color = {0,0,0},
	bg_alpha = .45, border = "Interface\\Addons\\FerousMedia\\Borders\\fer13.tga", 
	border_size = 4, border_color = "CLASS", border_alpha = 0.75,
        OnClick = function(self, button)
		if button == "LeftButton" then
			if LP_Talents:IsShown() then
				LP_Talents:Hide()
				LP_Stats:Hide()
				LP_ClearBox13:Hide()
			else
				LP_Talents:Show()
				LP_Stats:Show()
				LP_ClearBox13:Show()
			end
		print("Talents + Stats :: Toggled.")
		
		elseif button == "RightButton" then
				ToggleCharacter'PaperDollFrame'
		end
	end,
},
Red text being the code for the border on this panel. Just make sure you have the path right and your g2g.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 05:21 PM   #6
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Awesome, thanks! I'm currently experimenting with a panel. My goal is to create a panel that is transparent but can cover a certain part of my UI. I click the toggly panel, and then that panel goes away, revealing what was there. The code I'm using for the cover-up panel is simply:
Code:
lpanels:CreateLayout("TextCover", {
	{	name = "Box",
		strata = "HIGH",
		x_off = 886, y_off = 20,
		width = 370, height = 140,
		bg_color = "0 0 0", bg_alpha = 0.25,
		text = {
			string = "testing",
			size = 13,
		},
	},
}); lpanels:ApplyLayout(nil, "TextCover")
It creates a translucent black panel, but the item can still be seen behind it. Know how to fix that?
  Reply With Quote
06-02-10, 05:32 PM   #7
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Originally Posted by Politig View Post
Awesome, thanks! I'm currently experimenting with a panel. My goal is to create a panel that is transparent but can cover a certain part of my UI. I click the toggly panel, and then that panel goes away, revealing what was there. The code I'm using for the cover-up panel is simply:
Code:
lpanels:CreateLayout("TextCover", {
	{	name = "Box",
		strata = "HIGH",
		x_off = 886, y_off = 20,
		width = 370, height = 140,
		bg_color = "0 0 0", bg_alpha = 1,
		text = {
			string = "testing",
			size = 13,
		},
	},
}); lpanels:ApplyLayout(nil, "TextCover")
It creates a translucent black panel, but the item can still be seen behind it. Know how to fix that?
red text

The message you have entered is too short. Please lengthen your message to at least 10 characters.

You can also just create a toggle to hide the elements you are covering up, so you dont have a blackbox in the middle of your screen
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 05:39 PM   #8
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Originally Posted by Unkn View Post
red text

The message you have entered is too short. Please lengthen your message to at least 10 characters.

You can also just create a toggle to hide the elements you are covering up, so you dont have a blackbox in the middle of your screen
Well, I'm covering up a chat frame. With the modification to the code you posted, It just makes a huge black box, not a transparent one. I'm trying to get it to be transparent AND hide things behind it.
  Reply With Quote
06-02-10, 05:45 PM   #9
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Originally Posted by Politig View Post
Well, I'm covering up a chat frame. With the modification to the code you posted, It just makes a huge black box, not a transparent one. I'm trying to get it to be transparent AND hide things behind it.
Ah okay. Well now im working on this in my layout to get it to work, give me a few.

You should be able to just parent your cover box to the chat frame. Make it easy should you ever resize or move chatframe you wont have to resize the box.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"

Last edited by Unkn : 06-02-10 at 05:55 PM.
  Reply With Quote
06-02-10, 05:52 PM   #10
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Originally Posted by Unkn View Post
Ah okay.

Code for panel
Code:
lpanels:CreateLayout("TextCover", {
	{	name = "Box", parent = "ChatFrame" <<<prolly not the right name might have to look around for that
		strata = "HIGH", anchor_to = "CENTER"
		x_off = 0, y_off = 0,
		width = "100%", height = "100%",
		bg_color = "0 0 0", bg_alpha = 0,
		text = {
			string = "testing",
			size = 13,
		},

	},
}); lpanels:ApplyLayout(nil, "TextCover")
Code for button to toggle
Code:
 OnClick = function(self, button)
		if button == "LeftButton" then
			if LP_Box:IsShown() then
				LP_Box:Hide()
				ChatFrame:Show()
			else
				LP_Box:Show()
				ChatFrame:Hide()
			end
		end
	end,
You should be able to just parent your cover box to the chat frame. Make it easy should you ever resize or move chatframe you wont have to resize the box.
Setting the alpha to 0 makes it completely transparent. The chat behind it will still show, right?
  Reply With Quote
06-02-10, 05:57 PM   #11
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Originally Posted by Politig View Post
Setting the alpha to 0 makes it completely transparent. The chat behind it will still show, right?
You cant make a trasparent panel that hide things without hiding the things behind it. Its transparent, so whatever is behind it will show.

I'm trying to toggle the chat showing or hiding now.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 06:00 PM   #12
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Originally Posted by Unkn View Post
You cant make a trasparent panel that hide things without hiding the things behind it. Its transparent, so whatever is behind it will show.

I'm trying to toggle the chat showing or hiding now.
Rawr, I know it's possible with Kgpanels. Does click intercepting have anything to do with it?
  Reply With Quote
06-02-10, 06:02 PM   #13
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
No it has to do with the chat showing when you recieve a message I think... just a guess tho.

Why are you trying to hide chat? Are you putting something else there or just trying to cut down on screen clutter?
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 06:06 PM   #14
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Here's what I mean:

^^ That's an older version of my UI, but if you see the raid frames, you'll see that there is text behind it. Setting the strata on the panel to MEDIUM covers the text and keeps the frames, but I need it to be transparent ;_;
  Reply With Quote
06-02-10, 06:13 PM   #15
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
And yes you are right, its the mouseover of the panel thats messing with it, try set the transparent panel to intercept mouseover or mouseclicks.

Blah now I have to make this work. haha good job, you got my ocd into overdrive.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 06:18 PM   #16
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Your link for ss isnt working
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 06:18 PM   #17
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Originally Posted by Unkn View Post
Your link for ss isnt working
My what is whating?
  Reply With Quote
06-02-10, 06:20 PM   #18
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
I cant see whatever you posted showing your old ui.

Raid starting so this is not gonna be instantaneous responses anymore.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
06-02-10, 06:25 PM   #19
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
Originally Posted by Unkn View Post
I cant see whatever you posted showing your old ui.

Raid starting so this is not gonna be instantaneous responses anymore.
Well, imagine some raid frames overlapping some chat. That's what it looks like. I can't get the mouse intercepts to work I'm just using mouse = false, as stated in layout_example.lua file. It fails D:
  Reply With Quote
06-02-10, 06:38 PM   #20
harrellj
A Flamescale Wyrmkin
Join Date: Jul 2009
Posts: 132
As an initial caveat, I use kgpanels not litepanels, but had a similar issue with my own interface. If you use /framestack, what is the chatframe behind those raid panels? Take whatever number it is (3/4/5/etc) and add that number into Unkn's button toggle code (so it'd be ChatFrame#:Hide()/ChatFrame#:Show()).

Last edited by harrellj : 06-02-10 at 06:41 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » LitePanels Experts


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off