View Single Post
05-12-17, 12:16 AM   #12
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
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