Quantcast Looking for an addon that has well designed Interface options panel. - WoWInterface
Thread Tools Display Modes
05-08-17, 05:49 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Looking for an addon that has well designed Interface options panel.

Hi all,

The title says pretty much all

I'm currently looking for an addon which has a well designed Interface Options Panel so that I can use it as a learning reference.

The fundamental function of my Options panel would be adding/removing a spell id from db, SV.

So, I guess there should be at least:
  • Edit box to enter a spell id
  • Button to add a new spell to db
  • Scrollable list to display spell id and icon which player can select to remove
  • Button to remove a selected spell from db
  • 2~4 tabs attached to Scrollable list to select spec (2 for DH and 4 for Druid)

Could I get some recommendations?

Thank you!
  Reply With Quote
05-08-17, 09:39 AM   #2
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
I'm not advertising for lightspark's UI here, but it has exactly what you want!

Take a look at the 4th screenshot!
__________________
  Reply With Quote
05-08-17, 09:45 AM   #3
Kanegasi
A Rage Talon Dragon Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 337
While building my addon Decliner, the two most helpful addons for learning the interface options frame for me were Work_Complete and BadBoy_CCleaner. The former has a ton of comments in their code which made understanding how the frame works a lot easier and the latter gave me the plan for using a displayed list with an input box and a button to add or remove things from the list.
  Reply With Quote
05-08-17, 10:04 AM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 326
Originally Posted by syncrow View Post
I'm not advertising for lightspark's UI here, but it has exactly what you want!

Take a look at the 4th screenshot!
No! Just no!

Mate, config is the worst part of my UI, both code- and appearance-wise.
__________________
  Reply With Quote
05-08-17, 08:09 PM   #5
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Hi guys,

Thank you for the references !!

And lightspark, like syncrow said, your project is exactly what I've been looking for.

Please let me use your work as my learning reference !!
  Reply With Quote
05-08-17, 09:20 PM   #6
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
I barely get how lightspark's config dialog works (as I am a slow learner), but I guess the challenge would be combining custom frames to AceConfig, haha!!
  Reply With Quote
05-09-17, 01:38 AM   #7
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 326
Originally Posted by Layback_ View Post
I barely get how lightspark's config dialog works (as I am a slow learner), but I guess the challenge would be combining custom frames to AceConfig, haha!!
Mate, really, don't do it... At this point even I plan to move to Ace* libs.

I'm not saying it just to look humble/modest, I'm saying as a programmer, my config is not something you're looking for.

If you're already using Ace* libs, you're better off checking out elvUI config, it's well-organised, really clean and easy to use.
__________________

Last edited by lightspark : 05-09-17 at 03:46 AM.
  Reply With Quote
05-09-17, 03:44 AM   #8
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Originally Posted by lightspark View Post
Mate, really, don't do it... At this point even I plan to move to Ace* libs.

I'm not saying it just to look humble/modest, I'm saying as a programmer, my config is not something you're looking for.

If you're already using Ace* libs, you're better of checking out elvUI config, it's well-organised, really clean and easy to use.
If you say so, haha!

Hope to see a new version of your ls: UI soon !!

*EDIT: Just had a look at ElvUI's config and seems it's well designed like you said, but bit sad that there is no scrollable list T_T

Last edited by Layback_ : 05-09-17 at 04:29 AM.
  Reply With Quote
05-09-17, 02:18 PM   #9
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,691
Self-promoting but, if you want to try out something else you could take a look at my config library Wasabi.
It's widget-based and takes care of savedvariables automatically, implementing it is rather easy and has the possibility for plugins (although I do take suggestions/pullrequests if it's reasonable).

No wiki yet, although the test config should be easy enough to understand.
Also no profiles support yet, I'll be implementing that in June.

Using the ObjectContainer widget you should be able to implement a scrollable list like you want (everything in Wasabi is automatically made into a scrollable list if it exceeds the height of the parent container).

Last edited by p3lim : 05-09-17 at 02:21 PM.
  Reply With Quote
05-09-17, 08:08 PM   #10
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Originally Posted by p3lim View Post
Self-promoting but, if you want to try out something else you could take a look at my config library Wasabi.
It's widget-based and takes care of savedvariables automatically, implementing it is rather easy and has the possibility for plugins (although I do take suggestions/pullrequests if it's reasonable).

No wiki yet, although the test config should be easy enough to understand.
Also no profiles support yet, I'll be implementing that in June.

Using the ObjectContainer widget you should be able to implement a scrollable list like you want (everything in Wasabi is automatically made into a scrollable list if it exceeds the height of the parent container).
Sweet!!

Just had a time on testing your test code and got few questions.

(1) Is one WasabiOptionsPanel shared by all addons that uses Wasabi?

EDIT: My bad. It seems to create each panel via :New() and :CreateChild() functions.

(2) Would it be possible to modify position/size of sliders externally?
(I tried accessing either by calling ObjectSlider or object.Slider and neither of them worked.)

(3) What does this part of test code do?

Lua Code:
  1. -- Fill a table with random colors
  2. local defaults_objects = {objects={}}
  3. local r = math.random
  4. for index = 1, 100 do
  5.     defaults_objects.objects[index] = {r = r(), g = r(), b = r()}
  6. end
  7.  
  8. local ObjectContainer = Panel:CreateChild('ObjectContainer', 'WasabiObjectsDB', defaults_objects)

I get other two default tables and understand that you assigned a table with 100 different RGB colors, but I don't really see anything done with those values on ObjectContainer panel.

(4) Where could I find CreateObjectContainer function definition?

(5) This could be my personal preferences, but do you have any plans to implement faux scrollable list?

Last edited by Layback_ : 05-09-17 at 11:43 PM.
  Reply With Quote
05-11-17, 06:37 AM   #11
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,691
Originally Posted by Layback_ View Post
(2) Would it be possible to modify position/size of sliders externally?
(I tried accessing either by calling ObjectSlider or object.Slider and neither of them worked.)
You can, within the Initialization function you can access the global slider for the whole options panel through self.Slider, and for the slider for each ObjectContainer it's through ObjectContainer.Slider.
The Thumb and Up/Down buttons are only accessible through their global name, but I can change that.


Originally Posted by Layback_ View Post
(3) What does this part of test code do?

Lua Code:
  1. -- Fill a table with random colors
  2. local defaults_objects = {objects={}}
  3. local r = math.random
  4. for index = 1, 100 do
  5.     defaults_objects.objects[index] = {r = r(), g = r(), b = r()}
  6. end
  7.  
  8. local ObjectContainer = Panel:CreateChild('ObjectContainer', 'WasabiObjectsDB', defaults_objects)

I get other two default tables and understand that you assigned a table with 100 different RGB colors, but I don't really see anything done with those values on ObjectContainer panel.
It adds 100 random colors to a table, which is then used as the dummy data for the whole subpanel.
It not showing up is a bug I just fixed, forgot to update after some Texture method API was changed in Legion.
Latest GitHub source has that fixed, but since nothing changed in the core (just the test) I'm not updating it here on wowi.

Originally Posted by Layback_ View Post
(4) Where could I find CreateObjectContainer function definition?
As of the current version, line 148 in widgets/ObjectContainer.lua.
Wasabi's internal system exposes the registered widgets to the options panel by prefixing the widget name with "Create", see line 293 and 100 in Wasabi.lua.

Originally Posted by Layback_ View Post
(5) This could be my personal preferences, but do you have any plans to implement faux scrollable list?
No plans, but given a good reason I'll consider any feature request.

Last edited by p3lim : 05-11-17 at 08:18 AM.
  Reply With Quote
05-12-17, 12:16 AM   #12
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Hi p3lim,

Originally Posted by p3lim View Post
You can, within the Initialization function you can access the global slider for the whole options panel through self.Slider, and for the slider for each ObjectContainer it's through ObjectContainer.Slider.
The Thumb and Up/Down buttons are only accessible through their global name, but I can change that.
I've tested in each of Initialize function to call Slider and it seems to be returning a nil value.

Lua Code:
  1. local ObjectContainer = Panel:CreateChild('ObjectContainer', 'WasabiObjectsDB', defaults_objects)
  2. ObjectContainer:Initialize(function(self)
  3.     print(self.Slider);
  4.     print(ObjectContainer.Slider);
  5.  
  6.     -- Code...
  7. end

EDIT: According to UpdateSlider function in Wasabi.lua (L#252), it seems like Slider is not yet created until this function detects an overflow.

Does this mean that I should wait until it being created?

Originally Posted by p3lim View Post
It adds 100 random colors to a table, which is then used as the dummy data for the whole subpanel.
It not showing up is a bug I just fixed, forgot to update after some Texture method API was changed in Legion.
Latest GitHub source has that fixed, but since nothing changed in the core (just the test) I'm not updating it here on wowi.
Yeap, that did solve the problem.

I wasn't aware of that the APIs changed for textures

Originally Posted by p3lim View Post
As of the current version, line 148 in widgets/ObjectContainer.lua.
Wasabi's internal system exposes the registered widgets to the options panel by prefixing the widget name with "Create", see line 293 and 100 in Wasabi.lua.
Ah, that's why I could've not found it!

Thanks for letting me know

Originally Posted by p3lim View Post
No plans, but given a good reason I'll consider any feature request.
Sweet!

Thank you for your consideration

Last edited by Layback_ : 05-12-17 at 01:36 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Looking for an addon that has well designed Interface options panel.

Thread Tools
Display Modes

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