View Single Post
10-07-21, 10:30 AM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Other idea.

Lua Code:
  1. local function ScrollToCategory(panelName)
  2.   local idx
  3.   for i,cat in ipairs(INTERFACEOPTIONS_ADDONCATEGORIES) do
  4.     if not cat.hidden then
  5.       idx=(idx or 0) + 1
  6.       if cat.name == panelName then
  7.         break
  8.       end
  9.     end
  10.   end
  11.   local numbuttons = #(InterfaceOptionsFrameAddOns.buttons)
  12.   if idx and numbuttons and idx > numbuttons then
  13.     local btnHeight = InterfaceOptionsFrameAddOns.buttons[1]:GetHeight()
  14.     InterfaceOptionsFrameAddOnsListScrollBar:SetValue((idx-numbuttons)*btnHeight)
  15.   end
  16. end

Then using as
Code:
ScrollToCategory("Skillet")
.
It might need to be called on next frame after the first InterfaceOptionsFrame_OpenToCategory("Skillet")

I'm sure someone will come up with a more elegant solution.

Last edited by Dridzt : 10-07-21 at 04:12 PM.
  Reply With Quote