How to open addon interface options?
Edit: Shortly after making this post I found the answer. For anyone searching for the same thing, you just need to call
Code:
InterfaceOptionsFrame_OpenToCategory("ADDON NAME") I can hit escape and access the addons menu from there, but I wanted to add a slash command to open up the menu automatically. I've done this a long time ago and I forgot how I accomplished this. How would I open up the interface addon window and select a specific panel with LUA? |
Quick note, there has been a long standing bug(?) that prevents that code from always opening to the addon. The work around I use is first calling InterfaceOptionsFrame_Show before opening the category.
Lua Code:
|
Or you can just open to the category twice.
This usually happens if your addon is not visible in the scrollframe list on the left. |
Quote:
Lua Code:
Lua Code:
|
Other idea.
Lua Code:
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. |
It works!
Lua Code:
Thank you! |
Quote:
Code:
InterfaceOptionsFrameAddOnsListScrollBar:SetValue(0) That would make it more generic so it works for addons towards the top of the list when the last addon selected was a the bottom (list is already scrolled down from a previous user action) |
I modified it a little bit. Since Skillet has 3 sub-categories and as written, it always puts the main category at the bottom. I added an offset value so that once expanded, Skillet and its sub-categories were always on the screen.
Lua Code:
I guess the code should worry about setting a value that exceeds the maximum. |
All times are GMT -6. The time now is 11:03 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI