Quantcast
LitePanels - An art framework - Page 15 - WoWInterface
Thread Tools Display Modes
10-22-10, 06:59 AM   #281
nitewarlord
A Defias Bandit
AddOn Compiler - Click to view compilations
Join Date: May 2008
Posts: 2
Border Texture

This looks like a really great addon for replacing KGPanels as well as another great learning experience for me with coding along side oUF. Two questions though. First is how to anchor a border texture, I use fer_09.tga out of the Ferous Media Pack and I'm not quite sure how I would anchor it to the frames.

Also I use a solid background, not sure where the texture is located as its a blizz one that KGPanels picks up on and calls "Solid". Anyone know where I can find this?
  Reply With Quote
10-22-10, 07:42 AM   #282
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
Originally Posted by nitewarlord View Post
This looks like a really great addon for replacing KGPanels as well as another great learning experience for me with coding along side oUF. Two questions though. First is how to anchor a border texture, I use fer_09.tga out of the Ferous Media Pack and I'm not quite sure how I would anchor it to the frames.

Also I use a solid background, not sure where the texture is located as its a blizz one that KGPanels picks up on and calls "Solid". Anyone know where I can find this?
To use that border I would recommend copying the file into the media folder within the LitePanels folder, then in the layout for the panel('s) add:
Code:
 border="fer_09.tga",
Other border control's are available, and are described in the layout_example.lua file included in the addon.

As for your other question, I believe LitePanels uses the blizzard "SOLID" background file as it's default background, but if not you could try adding:
Code:
tex_file="SOLID",
Let me know if this helps you.
  Reply With Quote
10-22-10, 11:34 AM   #283
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by nitewarlord View Post
Also I use a solid background, not sure where the texture is located as its a blizz one that KGPanels picks up on and calls "Solid". Anyone know where I can find this?
I use "Interface/Buttons/WHITE8X8" and I suspect Kg does as well.

Also, the there is no default background texture, I use simply f:SetTexture(r,g,b,a) for a solid background. The border is the only thing that requires a "SOLID" texture to attain a pixel border, which can have its color/size changed via API.

Last edited by Katae : 10-22-10 at 11:46 AM.
  Reply With Quote
10-23-10, 04:20 AM   #284
oczr
A Kobold Labourer
Join Date: Oct 2010
Posts: 1
Hey

I'm using the Qulight UI, but the new version comes along with new litepanels.
They are almost gray now, not black anymore.

I want to change it.

This is the new code ...
Code:
bg_color = {0.1,0.1,0.1}
I tryed to use the color-code from the last version.

Code:
bg_color = {0.14,0.14,0.14}
But it is still gray.
Even when I change the bg_alpha from 0.7 to 0.9.

What exactly do i have to change ?
Or the better question ist: Whats the color code for black ?

Sorry for that newb question, but i'm almost new in the *.lua stuff
  Reply With Quote
10-23-10, 05:14 AM   #285
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
The color code for black would be "0, 0, 0".

The colors go from 0-1, or you could simply do "0, 255/255, 0" for a bright green. Dividing by 255 is done since most websites show their RGB values in ranges 0-255, instead of 0-1.

I've found a good gray to be 0.3.
__________________
All I see is strobe lights blinding me in my hindsight.
  Reply With Quote
10-24-10, 04:00 AM   #286
ApatiaMax
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 7
is there some way to "global scale" the textures ?
i mean, i've 4 block of 512x256 pixels, now, my container is 2048px but it's too much.
now if i say with = "100%" to the container, there are any chanse to have automatically scaled the texture too ?
  Reply With Quote
10-24-10, 02:04 PM   #287
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by ApatiaMax View Post
is there some way to "global scale" the textures ?
i mean, i've 4 block of 512x256 pixels, now, my container is 2048px but it's too much.
now if i say with = "100%" to the container, there are any chanse to have automatically scaled the texture too ?
You can do that. Give the container 100% width and put it where you want. For four inner panels, you can give each one of them 25% width, and each panel can be given a 25(n-1)% x_off. For instance, panel one would be "0%" x_off, panel two would be "25%" and so on. Textures should then scale uniformly with the container.

Code:
{name="container", width="100%", height=256, x_off=0, y_off=0},
{parent="container", width="25%", height="100%", x_off="0%"},
{parent="container", width="25%", height="100%", x_off="25%"},
{parent="container", width="25%", height="100%", x_off="50%"},
{parent="container", width="25%", height="100%", x_off="75%"},
Does that answer your question?

Last edited by Katae : 10-24-10 at 02:19 PM.
  Reply With Quote
11-09-10, 11:42 PM   #288
nitewarlord
A Defias Bandit
AddOn Compiler - Click to view compilations
Join Date: May 2008
Posts: 2
Gradient

Really enjoying this addon along with LiteStats to lower my UI usage. I just had one question. I want to put a small gradient at the top of each panel to give it a 3D kinda look like you can do with TipTac. I've tried the built in gradient feature but that puts a gradient throughout the entire frame. Any idea's would be greatly appreciated.
  Reply With Quote
11-09-10, 11:53 PM   #289
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
You could try making two panels, one with a gradient and one with none, and position them accordingly. I don't think there's a way in the API to set where the gradient appears.
  Reply With Quote
11-24-10, 12:24 PM   #290
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
oUF problems

Hey guys, long time
I'm (still) loving LitePanels, but I have one issue - oUF.

The problem is that when I parent a frame to the player and target (in this case, I use oUF_Svelte, so its oUF_SveltePlayer/Target), it produces 20+ errors per second (OnUpdate I think).

I've got a workaround, though it's not ideal:
For player, I just position the panels at the same place as the Playerframe, because it's stationary.
But with the target, it's much more difficult:

Code:
{	name = "target1",
	height = 30,
	width = 210,
	bg_alpha = 0,
	y_off = 210,
	x_off = 200,
	anchor_to = "CENTER",
	anchor_from = "BOTTOM",
	border = "Interface\\AddOns\\Ferous Media\\Borders\\fer13.tga",
	border_size = 5,
	border_color = "0 0 0",
	border_alpha = 1,
	inset = 5,
	OnLoad = function(self)
	self:RegisterEvent("UNIT_TARGET")
	self:Hide()
	end,
	OnEvent = function(self, unit)
	local exist = UnitExists("target")
		if (exist == 1) then
		self:Show()
		elseif (exist == nil) then
		self:Hide()
		end
	end,
},
This shows and hides the frame, although, it hides/shows with a slight delay, 0.5 sec i think.

Any way you could help?

btw, I posted in the oUF_Svelte comment section, will post in oUF Core too
  Reply With Quote
12-19-10, 04:05 AM   #291
Creatan
A Murloc Raider
Join Date: May 2009
Posts: 5
I'm having problems with textures. The layout that I create works fine and shows up as expected when I don't have the texture file declaration in there, but when I do the panel isn't created.
Code:
lpanels:CreateLayout("Load For All", {
	-- Create a global layout right here
	--Chat frame
	{
		name = "ChatBox", parent = "UIParent",
		anchor_to = "BOTTOMLEFT", anchor_from = "BOTTOMLEFT",
		x_off = 3, y_off = 28,
		width = 375, height = 170,
		bg_color= "0 0 0", bg_alpha = 0.5,
		tex_file = "Interface\\Addons\\LitePanels\\media\\texture.tga"
	},	
})
  Reply With Quote
12-19-10, 09:26 AM   #292
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by Creatan View Post
I'm having problems with textures. The layout that I create works fine and shows up as expected when I don't have the texture file declaration in there, but when I do the panel isn't created.
Code:
lpanels:CreateLayout("Load For All", {
	-- Create a global layout right here
	--Chat frame
	{
		name = "ChatBox", parent = "UIParent",
		anchor_to = "BOTTOMLEFT", anchor_from = "BOTTOMLEFT",
		x_off = 3, y_off = 28,
		width = 375, height = 170,
		bg_color= "0 0 0", bg_alpha = 0.5,
		tex_file = "Interface\\Addons\\LitePanels\\media\\texture.tga"
	},	
})
There is a problem with the tex_file command.
Workaround:
Code:
 --Chat frame
	{
		name = "ChatBox", parent = "UIParent",
		anchor_to = "BOTTOMLEFT", anchor_from = "BOTTOMLEFT",
		x_off = 3, y_off = 28,
		width = 375, height = 170,
                OnLoad = function(self)
	        self.bg:SetTexture("Interface\\Addons\\LitePanels\\media\\texture.tga") -- Path to the texture
	        self.bg:SetVertexColor(0, 0, 0, .5) -- (red, green, blue, alpha)
	        self.bg:SetHorizTile(false) -- Do you want it to repeat itself horizontaly, then true. If not, then false
	        self.bg:SetVertTile(false) -- Same as before, but vertical
	        end,
	},
This should work, if "texture.tga" is located in the media folder

Last edited by zynix : 12-19-10 at 09:31 AM. Reason: Made it more userfriendly
  Reply With Quote
12-19-10, 03:37 PM   #293
sevti
An Aku'mai Servant
Join Date: Oct 2010
Posts: 36
Originally Posted by zynix View Post
Hey guys, long time
I'm (still) loving LitePanels, but I have one issue - oUF.

The problem is that when I parent a frame to the player and target (in this case, I use oUF_Svelte, so its oUF_SveltePlayer/Target), it produces 20+ errors per second (OnUpdate I think).
I had the same problem parenting to oUF_Slim, so I went for another workaround route -- I coded the "panels" directly into the oUF layout. It may not work the same for Svelte, but I put the following code under the code for each individual unit (and adjusted setpoint/sizes based on the art):

Code:
		local TFrame = CreateFrame("Frame", nil, self)
		TFrame:ClearAllPoints();
		TFrame:SetPoint("CENTER", self, "CENTER", -1, -2);
		TFrame:SetWidth(256);
		TFrame:SetHeight(64);
		TFrame:SetFrameLevel(0)	
		TFrame:SetBackdrop({bgFile = "Interface\\AddOns\\dMedia\\sevUnitLong", tile = false})
I'm a bit of a noob with these things, so if there's something wrong with doing it that way anyone can feel free to enlighten me :x

Also, tex_file works fine for me, but I don't put the whole path in, since I have a "media" folder that I put the textures in - this is what one of my working panels looks like:

Code:
	{ name = "Top", parent = "UIParent", anchor_to="TOP", height=64,
		tex_file="sevTop", width=512 },
As you can see, it doesn't mess with alpha or color anything, so maybe that's why mine works? idk :/
  Reply With Quote
12-22-10, 09:48 AM   #294
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by sevti View Post
Snip
About the tex_file issue:
I guess it's only when the files aren't in the media folder?

Anyways, about the panels and oUF:
What do you mean about messing with the alpha?
I'm only changing the alpha of the panel I'm working on, the artwork.
So it won't mess with the alpha of the actual playerframe

Anyways, disregard my first comment. Moved to a diffirent layout
  Reply With Quote
01-14-11, 10:50 PM   #295
Gylindor
A Defias Bandit
Join Date: Apr 2009
Posts: 3
ok so how come height = "100%+10"(in fact +/- any number) works yet width = "100%-10"(+/- any number) doesn't?

what I'm trying to get is a panel at bottom of my ui that is the whole width of the screen less 10 pixels (5 each side), this is the whole panel code:

Code:
{	name = "bp", parent = "UIParent", anchor_to = "bottom", anchor_from = "bottom", 
        width = "100%-10", height = 20,
        strata = "background", level = 3,  y_off = 5,
	bg_color = "CLASS", bg_alpha = 1, 
        gradient = "V", gradient_color = {0,0,0}, gradient_alpha = 0, 
        border = "SOLID", border_color = "CLASS", border_size = 1, border_alpha = 1,
},

Last edited by Gylindor : 01-14-11 at 10:56 PM.
  Reply With Quote
01-15-11, 12:08 AM   #296
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
That's very strange, "100%-n" was working when I put it in there

You could also try giving the left and right insets a value of 5 to have the same effect, unless of course you have a border.
  Reply With Quote
01-15-11, 03:03 PM   #297
ziggen
A Defias Bandit
Join Date: Nov 2009
Posts: 3
Need help

I want to make borders around the buffs to make the borders pixel perfect, so what I want to do is just a plain black box wich I place behind the buff to get a 1 px border around it (I use bf with the apathy skin but well, the skin doesn't give a solid black line as border).

anyway, so how do I parent/anchor panels to the buffs? I tried with kgpanels and used it's frame finder thing, it said the buffs parent name is (I use SBF) SBFBuffIcon1 (then 2, 3 and so on) so I try to anchor it to those but nothing shows up with LitePanels. It works with kg but I don't want to use kg
  Reply With Quote
01-16-11, 08:40 PM   #298
Mordekai03
A Murloc Raider
Join Date: Aug 2008
Posts: 4
I'm trying to put panels around the health and mana bars on my unit frames. I'm using Pitbull4 and I can successfully get the panels to anchor to the Player frame, but for some reason I can't get it to work for any of the other frames. I don't know exactly what I'm doing wrong. This is the code that I'm using:
Code:
		-- Target Unit Frame Health Bar
	{	name = "TargetH0", parent = "PitBull4_BetterStatusBar_5",
		strata = "BACKGROUND",
		width = "100%", height = "100%",
		inset = -3,
		bg_color = "0 0 0",
	},
	{	name = "TargetH1", parent = "TargetH0",
		width = "100%", height = "100%",
		inset = -2,
		bg_color = "0.3 0.3 0.3",
	},
	{	name = "TargetH2", parent = "TargetH1",
		width = "100%", height = "100%",
		inset = -1,
		bg_color = "0.1 0.1 0.1",
	},
	
		-- Target Unit Frame Mana Bar
	{	name = "TargetM0", parent = "PitBull4_BetterStatusBar_6",
		strata = "BACKGROUND",
		width = "100%", height = "100%",
		inset = -3,
		bg_color = "0 0 0",
	},
	{	name = "TargetM1", parent = "TargetM0",
		width = "100%", height = "100%",
		inset = -2,
		bg_color = "0.3 0.3 0.3",
	},
	{	name = "TargetM2", parent = "TargetM1",
		width = "100%", height = "100%",
		inset = -1,
		bg_color = "0.1 0.1 0.1",
	},
  Reply With Quote
01-25-11, 09:04 PM   #299
LLozaa
A Deviate Faerie Dragon
Join Date: Jan 2011
Posts: 19
this is my ui and i wanna know how to get the stats to show where the red box is


kinda like this


thanks
  Reply With Quote
01-26-11, 03:17 AM   #300
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Originally Posted by LLozaa View Post
this is my ui and i wanna know how to get the stats to show where the red box is

thanks
You could use the Stats container layout, you would need to change the location of the box.
The first panel called Container is the one you'll need to edit.
You should change the anchor_to = "TOP", to anchor_to = "BOTTOM", remember the , after the line!

And you should change the y_off = -30, to around y_off = 10,
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » LitePanels - An art framework

Thread Tools
Display Modes

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