From a7e8cffb1ec2d4107e5d9b67636f3fdf6c9d365e Mon Sep 17 00:00:00 2001 From: rilgamon Date: Tue, 23 Mar 2021 11:01:21 +0100 Subject: [PATCH] Add toggle for options window --- broker.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/broker.lua b/broker.lua index ba6f1be..5905940 100644 --- a/broker.lua +++ b/broker.lua @@ -10,8 +10,12 @@ local function OnClick(self, button) if(IsShiftKeyDown()) then zzCoords_MinimapToggle() else - InterfaceOptionsFrame_OpenToCategory(childName) - InterfaceOptionsFrame_OpenToCategory(childName) + if(InterfaceOptionsFrame:IsVisible() and not InCombatLockdown()) then + InterfaceOptionsFrame:Hide() + else + InterfaceOptionsFrame_OpenToCategory(childName) + InterfaceOptionsFrame_OpenToCategory(childName) -- Twice because of a bug in InterfaceOptionsFrame_OpenToCategory + end end elseif(button == "LeftButton") then if(IsShiftKeyDown()) then