sojamo / controlp5

A gui library for processing.org
GNU Lesser General Public License v2.1
490 stars 142 forks source link

button handling and onReleaseOutside() #83

Open hpsiemon opened 8 years ago

hpsiemon commented 8 years ago

When using a button i expected behaviour as follows: Pressing the mouse inside button area should give feedback and releasing mouse inside button area should call action: this works fine. When moving mouse outside button area while mouse is pressed, button should give feedback, i.e. show normal image: this does not work. When moving mouse outside button area while mouse is pressed and then releasing mouse outside, action should not be invoked: this does not work, i.e. action is called anyway. Attaching a onReleaseOutside() to button does not help as it is invoked after action was called.

Any (not too complicated) way to come to the behaviour i want ? thanx

sojamo commented 7 years ago

You can take a look at CallbackListener using with the ControlP5callback example to customize actions for a controller.