View Single Post
05-09-17, 08:08 PM   #10
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
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