Add toggle for options window

This commit is contained in:
rilgamon 2021-03-23 11:01:21 +01:00
parent 48cecd9e76
commit a7e8cffb1e
1 changed files with 6 additions and 2 deletions

View File

@ -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