Continuous variable increase


#1

Hi all,

New to JUCE here, and C++...

I want to have a value that increases continuously for as long as I keep a textButton pressed down and stop when it is released.
I know when I press a button I get a "buttonThatWasPressed" callback, that could start a timer or something, but is there a "butttonThatWasReleased" kind of function?

Thank you in advance,

Nikolas

 


#2

Maybe look at Button::setRepeatSpeed ?


#3

Not sure if this is what you need , but the Button class has a ButtonState enum that can be read with getState().

enum Button::ButtonState

Used by setState().

ENUMERATOR
buttonNormal 
buttonOver 
buttonDown


#4

Well, I have a feeling that Jules can foretell the future..
This library has everything, and the Button::setRepeatSpeed was exactly what I needed.

Thank you both, and sorry about the obvious questions, they will go away in time (I hope).

Nikolas