lichtungsgnarr / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

Suggestion: override controlP5.addSlider() to explicitly create integer sliders #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there,

When dealing with controller events, I like to write one big controlEvent() 
function to handle all controllers rather than writing a whole bunch of little 
callbacks whose names are the same as the controller names.

The one time this scheme breaks down is when I want to create a slider that 
controls an integer value. The sliders I get from controlP5.addSlider() will 
always control float values, unless I create a callback for the slider that 
takes an integer for an argument.

I would like to recommend overriding the addSlider() function to create a 
slider for integer values if the arguments for min, max and initial variables 
are all of type 'int'.

Cheers,
Chris

Original issue reported on code.google.com by cjw...@gmail.com on 17 Nov 2010 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by soj...@gmail.com on 18 Jan 2012 at 4:03