Thread Tools Display Modes
12-04-09, 12:46 AM   #121
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Looks great

BTW, it would be ToggleFrame(QuestLogFrame).
  Reply With Quote
12-04-09, 01:12 AM   #122
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Katae View Post
Looks great

BTW, it would be ToggleFrame(QuestLogFrame).
Oh haha thanks, i looked and didn't find anything >.> Maybe it ain't updated who knows (wowwiki)
  Reply With Quote
12-04-09, 03:47 PM   #123
Tandurin
A Fallenroot Satyr
Join Date: Apr 2009
Posts: 25
I got a question how can I make the background of some panels transparent or partially transparent? I can't figure it out. :S
  Reply With Quote
12-04-09, 06:13 PM   #124
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Tandurin View Post
I got a question how can I make the background of some panels transparent or partially transparent? I can't figure it out. :S
Use an alpha value from 1.0 - 0.0, 1.0 being fully opaque, and 0.0 being fully transparent. (bg_alpha = 0.5)
  Reply With Quote
12-06-09, 01:38 PM   #125
Tandurin
A Fallenroot Satyr
Join Date: Apr 2009
Posts: 25
I have another question. I have the default Viewport done now however when I try to make a new layout it won't show it.

Here's the code:
Code:
lpanels:CreateLayout("Simple Viewport", {
	-- Main viewport background
	{	name = "GreyBox",
		strata = "BACKGROUND", level = 0,
		x_off = "1%", y_off = "1%",
		achor_to = "BOTTOM", 
		width = "98%", height = 165,
		bg_color = "0 0 0", bg_alpha = 1,	
	},
	-- A colored border anchored to the top of the viewport
	{	name = "TopBorder", parent = "GreyBox", 
		anchor_to = "TOP", y_off = 0,
		width = "100%", height = 2,
		bg_color = "0.4 0.6 1", bg_alpha = 1,
	},
	-- A colored border anchored to the bottom of the viewport
	{	name = "BottomBorder", parent = "GreyBox",
		anchor_to = "BOTTOM", y_off = 0,
		width = "100%", height = 2,
		bg_color = "0.4 0.6 1", bg_alpha = 1,
	},
	-- A colored border anchored to the left of the viewport
	{	name = "LeftBorder", parent = "GreyBox",
		anchor_to = "LEFT", x_off = 0,
		width = 2, height = "100%",
		bg_color = "0.4 0.6 1", bg_alpha = 1,
	},
	-- A colored border anchored to the right of the viewport
	{	name = "RightBorder", parent = "GreyBox",
		anchor_to = "LEFT", x_off = "98%",
		width = 2, heigth = "100%",
		bg_color = "0.4 0.6 1", bg_alpha = 1,
	},
});

lpanels:CreateLayout("Simple Topbar", {
	-- Main Topbar background
	{ 	name = "Simple Topbar",
		strata = "BACKGROUND", level = 0,
		x_off = "1%", y_off = 0,
		anchor_to = "BOTTOM",
		width = "98%", heigth = -55,
		bg_color = "0 0 0", bg_alpha = 1,
	},
});
lpanels:ApplyLayout(nil, "Simple Viewport", "Simple Topbar")
  Reply With Quote
12-06-09, 02:57 PM   #126
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
You are anchoring it to the bottom of your screen not on the bottom-part of your viewport, so they overlap and you see nothing.
You should try setting the parent of your top panel as the viewport.

Code:
parent = 'GreyBox'
You'll have to adjust the size and/or the anchoring to match your viewport borders.
  Reply With Quote
12-06-09, 03:38 PM   #127
Tandurin
A Fallenroot Satyr
Join Date: Apr 2009
Posts: 25
Ah I see, I feel stupid not noticing that.
  Reply With Quote
12-16-09, 06:37 AM   #128
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
Hi just a couple of questions.

The first is how can I make button show a frame on left click then hide it again on another left click, I so far can only do this using right click to hide and left click to show, this is the code I'm using currently:

Code:
{	name="DSHider", parent="BB", anchor_from="right", anchor_to="right", width=64, height=32, tex_file="mybutton", x_off=-45,
	text={ string="DS", anchor_to="center", shadow=1, font=text.font, color=text.color, size=text.size, },
	OnClick = function(self, button)
		if button == "RightButton" then
			LP_DS:Hide()
			elseif button == "LeftButton" then
			LP_DS:Show()
		end
	end
},
Next question is how do I hide a frame automaticaly when I first enter the game?
i.e. I have a frame that runs across the bottom of my UI, and another frame parented to that, but I want the second frame to only appear when I click the first frame.

Thanks for anyones help.

Lordy
  Reply With Quote
12-16-09, 07:04 AM   #129
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
You'd want to do something like:

Code:
OnLoad = function(self)
            self:RegisterEvent("PLAYER_ENTERING_WORLD")
            self:Hide()
Or something like that? Maybe Katae has a better answer :P
  Reply With Quote
12-16-09, 07:12 AM   #130
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Lordyfrb View Post
The first is how can I make button show a frame on left click then hide it again on another left click
For the button frame:
Code:
OnClick = function(self, button)
    if button == "LeftButton" then
        if myFrame:IsShown() then
            myFrame:Hide()
        else
            myFrame:Show()
        end
    end
end
  Reply With Quote
12-16-09, 08:25 AM   #131
demonii
A Murloc Raider
 
demonii's Avatar
Join Date: Oct 2008
Posts: 4
Looking at Fer's noVel ui, I can see it's possible to code in clicks to the panels (IE: toggle char frame..etc) Would it be possible to tie the click to a slash command? Example : Make a panel like one of fer's on the bottom of the screen that says 'Sort' or something that runs the /sort command of BankStack

Sorry If I happened to overlook this if its been asked >< prolly to early to ask questions.

-Thanks, Demo
  Reply With Quote
12-16-09, 08:30 AM   #132
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by demonii View Post
Looking at Fer's noVel ui, I can see it's possible to code in clicks to the panels (IE: toggle char frame..etc) Would it be possible to tie the click to a slash command? Example : Make a panel like one of fer's on the bottom of the screen that says 'Sort' or something that runs the /sort command of BankStack

Sorry If I happened to overlook this if its been asked >< prolly to early to ask questions.

-Thanks, Demo
I used to know the script for this but I have forgotten it a while back ... Let me see if I can find it

Here it is:

Code:
BankStack.SortBags()
  Reply With Quote
12-16-09, 08:33 AM   #133
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Code:
{	name = "game menu", 
			anchor_to = "CENTER", 
			y_off = -435,
			x_off = -270,
			width = "50", 
			height = "26",
			bg_color = {0.40,0.40,0.40}, 
			bg_alpha = 0.1,
			strata = "HIGH",
			border = "dbA",
			border_color = "0.25 0.25 0.25",
			border_size = 12,
			border_alpha = 1,
			inset = 2,
		OnClick = function(self, button)
			if button == "LeftButton" then
					BankStack.SortBags()
			end
		end,
			text = {
				{ string = "Menu", 
				anchor_to = "CENTER", 
				y_off = 0,
				shadow=1, 
				font =                          "Interface\\AddOns\\LitePanels\\media\\font.ttf", 
				size=20, 
				color = "0.25 0.25 0.25"
				},
 
			},
 
		},
just an example :P
  Reply With Quote
12-16-09, 08:33 AM   #134
demonii
A Murloc Raider
 
demonii's Avatar
Join Date: Oct 2008
Posts: 4
Originally Posted by Ferous View Post
I used to know the script for this but I have forgotten it a while back ... Let me see if I can find it

Here it is:

Code:
BankStack.SortBags()
Awesome! Ty fer ^_^

Edit: and for the example
  Reply With Quote
12-16-09, 12:26 PM   #135
Lordyfrb
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 71
Thank Katae and Ferous, both them scripts worked perfectly.

I'm pretty new to scripting, and playing with LitePanels has helped me somewhat.
  Reply With Quote
12-20-09, 08:20 AM   #136
Pixol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 13
Buff Reminder

Is it possible to create a script to remind us of a buff such as fort or inner fire? recently got rid of powerauras for raid because it was very cpu-intensive. So now I find myself mid-fight sometimes without my spellpower buffs
thank you
  Reply With Quote
12-24-09, 11:52 AM   #137
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Pixol View Post
Is it possible to create a script to remind us of a buff such as fort or inner fire? recently got rid of powerauras for raid because it was very cpu-intensive. So now I find myself mid-fight sometimes without my spellpower buffs
thank you
Sorry, didn't see your post till now.

Here's a quick buff check that will watch a specific buff and tell you if it's down. As a bonus, I added a 10 second countdown for when it's falling off.

Code:
{   name = "WatchBuff",
    anchor_to = "CENTER", anchor_from = "CENTER", y_off = 300,
    text = {
        string = function()
            local buff = "Inner Fire" -- name of watched buff
            local aura, time_left = UnitAura("player", buff)
            if aura then
                time_left = floor(select(7, UnitAura("player", buff)) - GetTime())
                if time_left <= 10 and time_left > 0 then
                    return format("%s is down in %s seconds", buff, time_left)
                end
            end
            if not aura or time_left <= 0 then
                return buff.." is down."
            end
        end,
        size = 10, color = "1 0.75 0", outline = 2,
    }
}

Last edited by Katae : 12-24-09 at 11:54 AM.
  Reply With Quote
12-24-09, 02:12 PM   #138
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Katae View Post
Sorry, didn't see your post till now.

Here's a quick buff check that will watch a specific buff and tell you if it's down. As a bonus, I added a 10 second countdown for when it's falling off.

Code:
{   name = "WatchBuff",
    anchor_to = "CENTER", anchor_from = "CENTER", y_off = 300,
    text = {
        string = function()
            local buff = "Inner Fire" -- name of watched buff
            local aura, time_left = UnitAura("player", buff)
            if aura then
                time_left = floor(select(7, UnitAura("player", buff)) - GetTime())
                if time_left <= 10 and time_left > 0 then
                    return format("%s is down in %s seconds", buff, time_left)
                end
            end
            if not aura or time_left <= 0 then
                return buff.." is down."
            end
        end,
        size = 10, color = "1 0.75 0", outline = 2,
    }
}
Oooo that looks really cool Thank you :O I would love this for my Tankadin buffs and making sure I have them :P Thanks Katae :O
  Reply With Quote
12-24-09, 04:15 PM   #139
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Is there a way to make a panel appear and disappear ingame with a command? Thanks :P
  Reply With Quote
12-24-09, 04:25 PM   #140
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Ferous View Post
Is there a way to make a panel appear and disappear ingame with a command? Thanks :P
Sure, you could do '/run local f=LP_PanelName if f:IsShown() then f:Hide() else f:Show() end'.

Maybe stick it in a macro or make your own SlashCmd function.

Edit: or maybe simply ToggleFrame(panel)

Last edited by Katae : 12-24-09 at 04:31 PM.
  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