|
Button Object (V1.0) |
Top Previous Next |
The button object detects when the button is pressed or released.
The on_button_pressed event is generated when the button is pressed. The on_button_released event is generated when the button is released.
The button.time read-only property returns the time (in 0.5 intervals) elapsed since the button was last pressed or released. You can use this property, for instance, to separate button pressing into "short" and "long":
sub on_button_released 'see how much time has elapsed
if button.time>4 then 'LONG- do one thing else 'SHORT- do another thing end if
end sub
|