WoW:Using the Interface Options Addons panel: Difference between revisions

m (Reverted edit(s) by 195.37.208.218 (talk) to last version by Zasurus)
Line 86: Line 86:


== Directly opening your options panel ==
== Directly opening your options panel ==
If you wish to open your addon's options panel directly – for example, with a slash command – you can do so by calling a single function:
If you wish to open your addon's options panel directly, you can do so by calling this function:


   InterfaceOptionsFrame_OpenToCategory(panel);
   InterfaceOptionsFrame_OpenToCategory(panel);
Line 93: Line 93:


   InterfaceOptionsFrame_OpenToCategory(panel.name);
   InterfaceOptionsFrame_OpenToCategory(panel.name);
Note: Call this function twice (in a row), there is a bug in Blizzard's code which makes the first call (after login or /reload) fail. It opens interface options but not on the addon's interface options; instead it opens the default interface options. If you call it twice in a row, it works as intended.


== Removing an existing options panel ==
== Removing an existing options panel ==
Anonymous user