Skip to content

Commit

Permalink
Update for DF settings panel
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Sep 10, 2023
1 parent 6111261 commit 8baaa93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ globals = {
"Enum",
"UnitPower",
"GetTime",
"SettingsPanel",

"InterfaceOptionsFrame",
"InterfaceOptionsFrame_OpenToCategory",
Expand Down
2 changes: 1 addition & 1 deletion NugRunning.lua
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function NugRunning.PLAYER_LOGIN(self,event,arg1)
NugRunning.SetupSpecialTimers()


local f = CreateFrame('Frame', nil, InterfaceOptionsFrame)
local f = CreateFrame('Frame', nil, SettingsPanel or InterfaceOptionsFrame)
f:SetScript('OnShow', function(self)
self:SetScript('OnShow', nil)
LoadAddOn('NugRunningOptions')
Expand Down
15 changes: 2 additions & 13 deletions Options/NugRunningOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,7 @@ local function MakeGeneralOptions()
AceConfigRegistry:RegisterOptionsTable("NugRunningGeneral", opt)

local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local panelFrame = AceConfigDialog:AddToBlizOptions("NugRunningGeneral", "General", "NugRunning")
local panelFrame = AceConfigDialog:AddToBlizOptions("NugRunningGeneral", "NugRunning")

return panelFrame
end
Expand Down Expand Up @@ -1919,21 +1919,10 @@ end

do
local f = CreateFrame('Frame', "NugRunningOptions", InterfaceOptionsFrame)
f.name = "NugRunning"
InterfaceOptions_AddCategory(f);

f.general = MakeGeneralOptions()
f.general = MakeGeneralOptions() -- makes the root category now
f.help = MakeHelp()

NugRunningGUI.frame = NugRunningGUI:Create("Spell List", "NugRunning")
f.spell_list = NugRunningGUI.frame.frame
InterfaceOptions_AddCategory(f.spell_list);

f:Hide()
f:SetScript("OnShow", function(self)
self:Hide();
local list = self.spell_list
InterfaceOptionsFrame_OpenToCategory (list)
InterfaceOptionsFrame_OpenToCategory (list)
end)
end

0 comments on commit 8baaa93

Please sign in to comment.