Re: simple-slider
Posted: Thu Aug 13, 2015 10:54 pm
Question! Could I make a material theme for this and make it part of my [shameless plug]Material-Love[/shameless plug] set of libraries? Of course with propper credits!
Wow that is really prettyPositive07 wrote:Question! Could I make a material theme for this and make it part of my [shameless plug]Material-Love[/shameless plug] set of libraries? Of course with propper credits!
Ohh! Thanks the best part is that is really slow on my PC hahaha those freaking shadows!!Kasperelo wrote: Wow that is really pretty
Yeah sure, though you might find it easier to start from scratch and use this as a guide.Positive07 wrote:Could I make a material theme for this and make it part of my [shameless plug]Material-Love[/shameless plug] set of libraries? Of course with propper credits!
Code: Select all
local silderinstance = require 'simple-slider'
* I'll leave this for people to handle themselves. For all my projects I have a 'container' class. The container is just a wrapper for a table, and when you call container:update(dt) or container:draw() it just calls that method on all objects on the table.SiENcE wrote: Some suggestions.
* keep a list of all sliders and make one silderinstance:update() and silderinstance:draw() function, so you don't need to specify this for every slider
* push it to github
* don't make it global
Please dont! What happens if for some reason I dont wanna update A SINGLE the slider?, for example I wont be showing it this frame so I dont want it to catch mouse events. Other case I simply dont wanna call draw for an specific slider but I have a single draw function! also how do you specify drawing order? for example I have a slider and then I want to draw a semitransparent overlay on top of it and after that another slider, but I have a single draw function!SiENcE wrote: * keep a list of all sliders and make one silderinstance:update() and silderinstance:draw() function, so you don't need to specify this for every slider
It's an simple slider implementation, not a complex gui system .Positive07 wrote:Please dont! What happens if for some reason I dont wanna update A SINGLE the slider?, for example I wont be showing it this frame so I dont want it to catch mouse events. Other case I simply dont wanna call draw for an specific slider but I have a single draw function! also how do you specify drawing order? for example I have a slider and then I want to draw a semitransparent overlay on top of it and after that another slider, but I have a single draw function!SiENcE wrote: * keep a list of all sliders and make one silderinstance:update() and silderinstance:draw() function, so you don't need to specify this for every slider