Export to GitHub

controlp5 - issue #10

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


Posted on Nov 17, 2010 by Happy Hippo

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

Comment #1

Posted on Jan 18, 2012 by Happy Rhino

(No comment was entered for this change.)

Status: WontFix

Labels:
Type-Defect Priority-Medium