I know little about frames, but this is how I try to find the option/"ButtonText" and then :Click() on it
This is my macro for printing all "ButtonTexts"
/run for i = 1, #InterfaceOptionsFrameAddOns.buttons do print(_G["InterfaceOptionsFrameAddOnsButton"..i]:GetText()) end
this script would collapse the addon "Inline Aura"
I don't know how you would do this for autocollapsing all the options/buttons of your addon though
[PHP]for i = 1, #InterfaceOptionsFrameAddOns.buttons do
if _G["InterfaceOptionsFrameAddOnsButton"..i]:GetText() == "Inline Aura" then
_G["InterfaceOptionsFrameAddOnsButton"..i.."Toggle"]:Click()
end
end[/PHP]
I dont know about the AceConfigDialog though ..
Thank you for sharing that. Being able to do the :Click() is 1/2 the battle for what I'm trying to do! :)
They can also just single-click on the little +/- button, unless I'm misunderstanding you horribly.
You are correct. I had mentioned that in my original version of my OP, but I had edited that info out (can't remember why; shorten the OP??).
My goal was to auto-select one branch and auto-expand it, while auto-collapsing all other branches. Since there are many branches, if the user decides to go through them all w/o closing the ones he/she is done with, you get a huge scroll list after a bit.
as far as InterfaceOptionsFrame_OpenToCategory goes thats just a standard blizzard api call to open to your config page it has no control over anything you do with aceconfigdialog
I was aware that its a Blizzard api call actually. I was just hoping that someone here who's expert in using it may know which arguments to pass to get a aceconfigdialog tree branch to open, instead of the add-ons main branch instead.
Using AceConfig-3.0, and I have a tree structure like this...
Option 1
-- Value 1
-- Value 2
Option 2
-- Value 1
-- Value 2
By default, at startup, when a InterfaceOptionsFrame_OpenToCategory(self.optionsFrame) is done, the user sees all of the branches collapsed like this...
Option 1 +
Option 2 +
Currently, if the user double clicks on "Option 1" or "Option 2", the tree expands, showing the 'Value' leaves.
What I'd like to do is make it so that the user has to just single-click on an Option branch to open that branch up and collapse all other Options, so it looks like this (clicking on 'Option 1')...
Option 1
-- Value 1
-- Value 2
Option 2 +
or (clicking on 'Option 2')...
Option 1 +
Option 2
-- Value 1
-- Value 2
I'm not able to figure out a way to add listeners to the Option branches or the Ace3 api call to make to collapse a branch (or even to get a branch reference).
Appreciate any info/help/non-summary/non-general links on this. Example code would be best, a good article will be fine, I'll take high-level api calls.
Thanks in advance.
P.S. I'm using "InterfaceOptionsFrame_OpenToCategory(self.optionsFrame)", is that correct? If so, is there a way to tell it to open a specific branch (ex.: 'Option 2') directly?
0
Also a way to listen for clicks on options tree branches so that I can fire off my own lua function/code.
0
Thank you for sharing that. Being able to do the :Click() is 1/2 the battle for what I'm trying to do! :)
0
Thank you for sharing that, that's 1/2 of what I need!
0
You are correct. I had mentioned that in my original version of my OP, but I had edited that info out (can't remember why; shorten the OP??).
My goal was to auto-select one branch and auto-expand it, while auto-collapsing all other branches. Since there are many branches, if the user decides to go through them all w/o closing the ones he/she is done with, you get a huge scroll list after a bit.
0
Ah, that's too bad. Would love to auto-select a tree branch based on a value. If I could only just hook a listener to the clicks of the tree.
I was aware that its a Blizzard api call actually. I was just hoping that someone here who's expert in using it may know which arguments to pass to get a aceconfigdialog tree branch to open, instead of the add-ons main branch instead.
Thanks for replying.
0
Option 1
-- Value 1
-- Value 2
Option 2
-- Value 1
-- Value 2
By default, at startup, when a InterfaceOptionsFrame_OpenToCategory(self.optionsFrame) is done, the user sees all of the branches collapsed like this...
Option 1 +
Option 2 +
Currently, if the user double clicks on "Option 1" or "Option 2", the tree expands, showing the 'Value' leaves.
What I'd like to do is make it so that the user has to just single-click on an Option branch to open that branch up and collapse all other Options, so it looks like this (clicking on 'Option 1')...
Option 1
-- Value 1
-- Value 2
Option 2 +
or (clicking on 'Option 2')...
Option 1 +
Option 2
-- Value 1
-- Value 2
I'm not able to figure out a way to add listeners to the Option branches or the Ace3 api call to make to collapse a branch (or even to get a branch reference).
Appreciate any info/help/non-summary/non-general links on this. Example code would be best, a good article will be fine, I'll take high-level api calls.
Thanks in advance.
P.S. I'm using "InterfaceOptionsFrame_OpenToCategory(self.optionsFrame)", is that correct? If so, is there a way to tell it to open a specific branch (ex.: 'Option 2') directly?
0