Thread Tools Display Modes
10-16-22, 05:44 AM   #1
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Opening an addon settings panel?

Hello,

To open the settings panel of my addon, I use:
Lua Code:
  1. Settings.OpenToCategory(myAddonName)
It worked fine on previous PTR versions but now, this command only opens the general options panel.
Furthermore, if I have several addons, each settings panel is not always refreshed ("open" event is not always sent).

Is there a new way to open an addon settings panel?
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
10-16-22, 07:26 AM   #2
sirpucna
An Aku'mai Servant
Join Date: Nov 2016
Posts: 33
try instead:
Code:
InterfaceOptionsFrame:Show()
InterfaceOptionsFrame_OpenToCategory("YourAddonName")
  Reply With Quote
10-16-22, 08:10 AM   #3
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Code:
InterfaceOptionsFrame:Show()
This raises an error on PTR.

Code:
InterfaceOptionsFrame_OpenToCategory("YourAddonName")
This is deprecated, according to https://github.com/Gethe/wow-ui-sour...recated.lua#L4
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
10-16-22, 09:21 AM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
You could try this .. Dragonflight includes a fair amount of UI changes

https://wowpedia.fandom.com/wiki/Pat....0/API_changes

There has been some issues however where the settings panel will trigger errors. Whether it is the fault of the code in the addon or the changes in the blizzard code is hard to say.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
10-16-22, 10:06 AM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Originally Posted by Xrystal View Post
.. Dragonflight includes a fair amount of UI changes
So many in fact, ther's also a seperate page to cover the Beta (the actual Dragonflight expansion release) version which has differences that are not in the PTR.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
10-16-22, 11:17 AM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
thanks, I was looking for that second one .. but guess I forgot how to get to that page rofl
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
10-16-22, 11:23 AM   #7
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
I was just lucky that changing the last 0 to a 2 got me there
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
10-16-22, 11:46 AM   #8
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Originally Posted by Xrystal View Post
You could try this .. Dragonflight includes a fair amount of UI changes
https://wowpedia.fandom.com/wiki/Pat....0/API_changes
Yes, that's what I did, and the Canvas Layout example worked on previous PTR versions. Maybe it will work again in next versions...
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
10-16-22, 06:18 PM   #9
sirpucna
An Aku'mai Servant
Join Date: Nov 2016
Posts: 33
Originally Posted by Zax View Post
Code:
InterfaceOptionsFrame:Show()
This raises an error on PTR.

Code:
InterfaceOptionsFrame_OpenToCategory("YourAddonName")
This is deprecated, according to https://github.com/Gethe/wow-ui-sour...recated.lua#L4
ahh InterfaceOptionsFrame:Show() did indeed throw a error, swear it didn't in beta last week, but regarding beta(not ptr), the following was tested working just now.
Code:
	CreateFrame("Frame", "OptionsPanel")
	OptionsPanel.name = "YourAddon"
	InterfaceOptions_AddCategory(OptionsPanel)
	SlashCmdList["ABCSlash"] = function()
		InterfaceOptionsFrame_OpenToCategory("YourAddon")
	end
	SLASH_ABCSlash1 = "/abc"

Last edited by sirpucna : 10-16-22 at 06:20 PM.
  Reply With Quote
10-17-22, 08:14 AM   #10
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Code:
	CreateFrame("Frame", "OptionsPanel")
	OptionsPanel.name = "YourAddon"
	InterfaceOptions_AddCategory(OptionsPanel)
	SlashCmdList["ABCSlash"] = function()
		InterfaceOptionsFrame_OpenToCategory("YourAddon")
	end
	SLASH_ABCSlash1 = "/abc"
Thank you.
It doesn't work better than my original script but we'll see on next PTR versions.
__________________
Zax - Addons List, not all maintained.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » Opening an addon settings panel?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off