From 23f7863661310f40dab63dcf55b0f8ed3fadf667 Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Tue, 11 Jun 2024 08:14:54 -0700 Subject: [PATCH] Support TWW --- Myslot.toc | 2 +- gui.lua | 4 +--- options.lua | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Myslot.toc b/Myslot.toc index e9ee37d..793ae7e 100644 --- a/Myslot.toc +++ b/Myslot.toc @@ -1,4 +1,4 @@ -## Interface: 100207 +## Interface: 100207, 110000 ## Interface-Classic: 11502 ## Interface-Cata: 40400 ## Interface-Wrath: 30403 diff --git a/gui.lua b/gui.lua index 2dcb971..91519b9 100644 --- a/gui.lua +++ b/gui.lua @@ -528,9 +528,7 @@ SlashCmdList["MYSLOT"] = function(msg, editbox) end elseif cmd == "clear" then - -- MySlot:Clear(what) - InterfaceOptionsFrame_OpenToCategory(L["Myslot"]) - InterfaceOptionsFrame_OpenToCategory(L["Myslot"]) + Settings.OpenToCategory(MySlot.settingcategory.ID) elseif cmd == "trim" then if not MyslotExports then MyslotExports = {} diff --git a/options.lua b/options.lua index 659c524..7383e75 100644 --- a/options.lua +++ b/options.lua @@ -5,7 +5,10 @@ local RegEvent = MySlot.regevent local f = CreateFrame("Frame", nil, UIParent) f.name = L["Myslot"] -InterfaceOptions_AddCategory(f) + +local category = Settings.RegisterCanvasLayoutCategory(f, L["Myslot"]) +MySlot.settingcategory = category +Settings.RegisterAddOnCategory(category) RegEvent("ADDON_LOADED", function() do