From 25786dc1158041b3d65bb012268c66b13ad6dfc4 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 25 Jan 2008 15:59:43 +0000 Subject: [PATCH] * Double-click to edit buffs and raid frame entries --- PerfectRaid_Buffs.lua | 13 ++++++++++++- PerfectRaid_Frames.lua | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) 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 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 -- 1.7.9.5