WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Anchoring Recount to a frame and mouse over alpha (https://www.wowinterface.com/forums/showthread.php?t=44239)

clix 09-09-12 06:06 AM

Anchoring Recount to a frame and mouse over alpha
 
What I was trying to do is, make a script that that relocated Recount (working fine) and then changes the alpha based on is the mouse is over or not.

This is my current script, everything is working fine, besides I cannot get the frame that Recount is anchored to, to let me click through it and manipulate recount.

Code:

local RecWinHold = CreateFrame("Frame", "RecWinHold", UIParent)
        RecWinHold:SetScript("OnUpdate", function(self)
                Recount:LockWindows( true )
                RecWinHold:SetFrameStrata("HIGH")
                RecWinHold:EnableMouse(true)
                RecWinHold:SetAlpha(0)
                RecWinHold:Point("center", -22, 468) RecWinHold:Size(250, 150)
                Recount_MainWindow:SetWidth(RecWinHold:GetWidth())
                Recount_MainWindow:SetHeight(RecWinHold:GetHeight())
                Recount_MainWindow:SetPoint("TOPRIGHT", RecWinHold,"TOPRIGHT", 0, 6)
                RecWinHold:RegisterAllEvents()

                        RecWinHold:SetScript("OnEnter", function()
                                Recount.MainWindow:SetAlpha(1);
                                RecWinHold:SetAlpha(1);
                                print("Showing Windows!")
                        end)
                               
                        RecWinHold:SetScript("OnLeave", function()
                                Recount.MainWindow:SetAlpha(0);
                                RecWinHold:SetAlpha(0);
                                print("Hiding Windows!")
                        end)
        end)

I've tried using "RecWinHold:EnableMouse(false)", but it keeps spamming the print's from both OnEnter & OnLeave.

Anyone have any ideas on this?


All times are GMT -6. The time now is 01:38 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI