From 2466c81efe86426ab42a12d9e90387c0be56b8de Mon Sep 17 00:00:00 2001 From: Brad Morgan Date: Tue, 8 Oct 2024 14:41:53 -0600 Subject: [PATCH] Fix issue #187, ShowOptions --- SkilletOptions.lua | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/SkilletOptions.lua b/SkilletOptions.lua index 9682f0c..c1c5cf8 100644 --- a/SkilletOptions.lua +++ b/SkilletOptions.lua @@ -1588,35 +1588,10 @@ function Skillet:ConfigureOptions() acedia:AddToBlizOptions("Skillet Plugins", "Plugins", "Skillet") end -local function ScrollToCategory(panelName,offset) - local idx = 0 - InterfaceOptionsFrameAddOnsListScrollBar:SetValue(0) - local mdx = #INTERFACEOPTIONS_ADDONCATEGORIES - for i,cat in ipairs(INTERFACEOPTIONS_ADDONCATEGORIES) do - if not cat.hidden then - idx = idx + 1 - if cat.name == panelName then - break - end - end - end - local numbuttons = #(InterfaceOptionsFrameAddOns.buttons) - --DA.DEBUG(0,"ScrollToCategory: numbuttons= "..tostring(numbuttons)..", idx= "..tostring(idx)..", mdx= "..tostring(mdx)..", offset= "..tostring(offset)) - if idx and numbuttons and idx > numbuttons then - local btnHeight = InterfaceOptionsFrameAddOns.buttons[1]:GetHeight() - if offset+idx > mdx then - idx = mdx - offset - end - InterfaceOptionsFrameAddOnsListScrollBar:SetValue((offset+idx-numbuttons)*btnHeight) - end -end - -- -- Show the options window -- function Skillet:ShowOptions() - InterfaceOptionsFrame_Show() - ScrollToCategory("Skillet",4) - InterfaceOptionsFrame_OpenToCategory("Skillet") + Settings.OpenToCategory("Skillet") end