diff Comments.lua @ 264:58b090074eda

Allow moving the comment frame via the WoWDB logo, and disallow clicking through the frame to the 3D world.
author James D. Callahan III <jcallahan@curse.com>
date Tue, 19 Mar 2013 23:53:38 -0500
parents 03f1fbe64104
children 726e8a94391d
line wrap: on
line diff
--- a/Comments.lua	Tue Mar 19 14:51:50 2013 -0500
+++ b/Comments.lua	Tue Mar 19 23:53:38 2013 -0500
@@ -77,6 +77,8 @@
     panel.Bg:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]], true, true)
     panel.Bg:SetHorizTile(true)
     panel.Bg:SetVertTile(true)
+    panel:EnableMouse(true)
+    panel:SetMovable(true)
     panel:Hide()
     comment_frame = panel
 
@@ -92,6 +94,16 @@
     header.Bg:SetTexture([[Interface\FrameGeneral\UI-Background-Marble]])
     header.Bg:SetHorizTile(true)
     header.Bg:SetVertTile(true)
+    header:SetMovable(true)
+
+    header:SetScript("OnMouseDown", function()
+        panel:StartMoving()
+    end)
+
+    header:SetScript("OnMouseUp", function()
+        panel:StopMovingOrSizing()
+    end)
+
     panel.header = header
 
     local logo = header:CreateTexture(nil, "ARTWORK")