From c15bb5c8d539b48e2a671a7d763f2a8403f13a0f Mon Sep 17 00:00:00 2001 From: atomaka Date: Mon, 19 Sep 2011 04:59:17 -0400 Subject: [PATCH] Make minimap button toggle. --- ChoreTracker.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ChoreTracker.lua b/ChoreTracker.lua index d55c3ea..f1148ae 100644 --- a/ChoreTracker.lua +++ b/ChoreTracker.lua @@ -103,7 +103,13 @@ function core:OnEnable() type = 'data source', text = 'ChoreTracker', icon = 'Interface\\AddOns\\ChoreTracker\\icon', - OnClick = function() LibStub("AceConfigDialog-3.0"):Open("ChoreTracker") end, + OnClick = function() + if LibStub("AceConfigDialog-3.0").OpenFrames['ChoreTracker'] then + LibStub('AceConfigDialog-3.0'):Close('ChoreTracker') + else + LibStub('AceConfigDialog-3.0'):Open('ChoreTracker') + end + end, OnEnter = function(self) local columnCount = 2 for instance,abbreviation in pairs(trackedInstances) do