Originally Posted by Shestak
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.
|
This is happening because the cursor is being intercepted by the DBM button, so the parent "thinks" that the cursor is leaving it, thus triggering the OnLeave function.
You can get around this pretty easily by checking if the cursor is not hovering over a child panel:
Code:
OnLeave = function(self)
if GetMouseFocus():GetParent() ~= self then self:SetAlpha(0) end
end,