diff --git a/.luacheckrc b/.luacheckrc index 4433689..724466a 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -57,6 +57,7 @@ stds.wow = { "RaidNotice_AddMessage", "RaidWarningFrame", "SendChatMessage", + "Settings", "SOUNDKIT", "StaticPopup_Show", "time", diff --git a/.vscode/settings.json b/.vscode/settings.json index 9fe6e4d..6fc821d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -51,6 +51,7 @@ "PlaySound", "string", "math", + "Settings", "SOUNDKIT", "IsInRaid", "IsInGroup", diff --git a/Options.lua b/Options.lua index f472fbe..6268db5 100644 --- a/Options.lua +++ b/Options.lua @@ -32,6 +32,9 @@ local panel = Opt.Panel panel.name = "KillTrack" panel:Hide() +local category = Settings.RegisterCanvasLayoutCategory(panel, panel.name) +Opt.Category = category + -- Dirty hack to give a name to option checkboxes local checkCounter = 0 @@ -73,8 +76,7 @@ local function HideBlizzOptions() end function Opt:Open() - InterfaceOptionsFrame_OpenToCategory(panel) - InterfaceOptionsFrame_OpenToCategory(panel) + Settings.OpenToCategory(self.Category.ID) end function Opt:Show() @@ -259,4 +261,4 @@ end panel:SetScript("OnShow", function(self) Opt.Show(self) end) -InterfaceOptions_AddCategory(panel) +Settings.RegisterAddOnCategory(category)