Thread Tools Display Modes
09-09-12, 06:06 AM   #1
clix
A Murloc Raider
Join Date: Nov 2009
Posts: 9
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?
__________________
You, me, or nobody is gonna hit as hard as life. But it ain't about how hard ya hit. It's about how hard you can get it and keep moving forward. How much you can take and keep moving forward. That's how winning is done! -Rocky Balboa (2006)

Last edited by clix : 09-09-12 at 01:34 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Anchoring Recount to a frame and mouse over alpha


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