diff --git a/config.lua b/config.lua index 95b1329..bb1b608 100644 --- a/config.lua +++ b/config.lua @@ -148,5 +148,11 @@ frame:SetScript("OnShow", function(frame) frame:SetScript("OnShow", nil) end) -InterfaceOptions_AddCategory(frame) +if InterfaceOptions_AddCategory then + InterfaceOptions_AddCategory(frame) +else + local category, layout = Settings.RegisterCanvasLayoutCategory(frame, frame.name); + Settings.RegisterAddOnCategory(category); + addon.settingsCategory = category +end diff --git a/core.lua b/core.lua index 597513d..10f5be7 100644 --- a/core.lua +++ b/core.lua @@ -142,8 +142,12 @@ do if msg == "show" then addon:OpenSack() else - InterfaceOptionsFrame_OpenToCategory(addonName) - InterfaceOptionsFrame_OpenToCategory(addonName) + if InterfaceOptionsFrame_OpenToCategory then + InterfaceOptionsFrame_OpenToCategory(addonName) + InterfaceOptionsFrame_OpenToCategory(addonName) + else + Settings.OpenToCategory(addon.settingsCategory.ID) + end end end SLASH_BugSack1 = "/bugsack" diff --git a/ldb.lua b/ldb.lua index fd289a2..520ae2e 100644 --- a/ldb.lua +++ b/ldb.lua @@ -15,8 +15,12 @@ local BugGrabber = BugGrabber function plugin.OnClick(self, button) if button == "RightButton" then - InterfaceOptionsFrame_OpenToCategory(addonName) - InterfaceOptionsFrame_OpenToCategory(addonName) + if InterfaceOptionsFrame_OpenToCategory then + InterfaceOptionsFrame_OpenToCategory(addonName) + InterfaceOptionsFrame_OpenToCategory(addonName) + else + Settings.OpenToCategory(addon.settingsCategory.ID) + end else if IsShiftKeyDown() then ReloadUI()