A Lauchpad-GUI-Element (LPView subclass) which is modeled afer the Button Class.
The example creates a button at the top left corner of the launchpad.
creates a new LPButton that needs to be initialized further for use.
range |
A LPRange you will get from Lauchpad. |
onfront |
A function which will be called when the view put on the front of the Lauchpad. |
onhide |
A function which will be called when the view is removed from the Lauchpad. |
a LPButton
Puts the LPButton on the front of the Launchpad. (like open a GUI).
... args |
arguments which will forwarded to the onfront-function. |
Hides the LPButton from the Launchpad.
updateLEDs |
if LEDs should be updated or not. To not update LEDs can make the response faster if after a close something else is opened. |
... args |
further arguments will forwarded to the onhide-function. |
The Array of LPLEDs describes the color of the different states of the LPButton.
A function that is called when the Button on the Launchpad is pushed. The function gets as first argument the LPButton itself.
Instance variable that defines how a button push affects the counting through the states. The following modes can be set through by using a symbol
\forward \backward \stuck \reset
Forward counts upwards. Backward counts downwards. Stuck does not change the state. Reset sets and keeps the state at 0.