View Single Post
01-24-10, 08:45 PM   #166
Shestak
A Deviate Faerie Dragon
 
Shestak's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 11
Hi. I can not understand.
I created a panel for the buttons.
Create a button that launches the setup DBM.
And like that would bar was mousover.

All is well, everything works, and the panel and the button. DBM run. But mousover works only on an area of the panel, where there is no text. And if you move the cursor to an area where there is text, the panel does not appear.

Where can I go wrong in the code?

Code:
{	name = "Buttons panel",
	anchor_to = "BOTTOM", x_off = 285, y_off = 6,
	width = 200, height = 7,
	bg_alpha = 1,
	OnLoad = function(self) self:SetAlpha(0) end,
	OnEnter = function(self) self:SetAlpha(1) end,
	OnLeave = function(self) self:SetAlpha(0) end,
},
{	name = "DBM Button", parent = "Buttons panel",
	anchor_to = "LEFT", x_off = 0, y_off = 1,
	OnClick = function(self, button)
		if button == "LeftButton" then
			DBM:LoadGUI()
		end
	end,
	text = {
		{ string = "DBM", 
			anchor_to = "CENTER", 
			outline=1, 
			font = main_font, 
			size = main_font_size, 
			color = "CLASS"
		},
	},
},
  Reply With Quote