View Single Post
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