View Single Post
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,710
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