Quantcast

* Double-click to edit buffs and raid frame entries

James Whitehead II [01-25-08 - 15:59]
* Double-click to edit buffs and raid frame entries
Filename
PerfectRaid_Buffs.lua
PerfectRaid_Frames.lua
diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua
index 770e09f..3468e3e 100644
--- a/PerfectRaid_Buffs.lua
+++ b/PerfectRaid_Buffs.lua
@@ -1,4 +1,4 @@
- --[[-------------------------------------------------------------------------
+--[[-------------------------------------------------------------------------
   Copyright (c) 2006, Jim Whitehead II <cladhaire@gmail.com>
   All rights reserved.

@@ -261,6 +261,17 @@ function Buffs:CreateOptions(opt)
 	local num_entries = 15
 	local scrollframe = opt:CreateListFrame(options, num_entries)

+	-- Set up double-click handlers
+	local function OnDoubleClick(button)
+		button:Click()
+		self:EditEntry()
+	end
+
+	for i=1,num_entries do
+		button = scrollframe.entries[i]
+		button:SetScript("OnDoubleClick", OnDoubleClick)
+	end
+
 	local update = function()
 		local list = PerfectRaid.db.profile.buffs

diff --git a/PerfectRaid_Frames.lua b/PerfectRaid_Frames.lua
index acb33ee..907e2eb 100644
--- a/PerfectRaid_Frames.lua
+++ b/PerfectRaid_Frames.lua
@@ -81,6 +81,17 @@ function Frames:CreateOptions(opt)
 	local num_entries = 15
 	local scrollframe = opt:CreateListFrame(options, num_entries)

+	-- Set up double-click handlers
+	local function OnDoubleClick(button)
+		button:Click()
+		self:EditEntry()
+	end
+
+	for i=1,num_entries do
+		button = scrollframe.entries[i]
+		button:SetScript("OnDoubleClick", OnDoubleClick)
+	end
+
 	local update = function()
 		local list = PerfectRaid.db.profile.headers