GMPlayButton is an easy to use customisable button.
It natively alternates between two visual symbols related to the idea of playing and stopping a sound.
The second symbol can either be a symbol related to stopping a sound, or related to pausing a sound.
It only responds to mouse down clicks, and does not discriminate button identifiers.
Creates a new instance of GMPlayButton.
By default, its graphical properties are defined by its associated GMStyle. It uses both outlineColor
and outlineSize
properties.
a GMPlayButton instance.
Sets or gets the Function to be triggered when the button is pressed down. This Function takes the current state of the button as a boolean as argument, i.e. pressing it down once will call the Function passing true
as argument, pressing it down a second time will call the Function passing false
as argument, etc.
aFunction |
A Function with one argument, the state of the button as a Boolean. |
Sets or gets the Function to be triggered when the button is pressed down. This Function takes the current state of the button as a boolean as argument, i.e. pressing it down once will call the Function passing true
as argument, pressing it down a second time will call the Function passing false
as argument, etc. Equivalent to .action
.
aFunction |
A Function with one argument, the state of the button as a Boolean. |
Toggles the button, changing its state and evaluating the associated action.
Toggles the button display, changing its state without evaluating the associated action.
Sets the button display, changing its state without evaluating the associated action.
Sets or gets the type of symbol the second state displays. This is only a visual property.
aSymbol |
The View second state will display two vertical bars if set as |
Sets or gets the symbol size relative to its smallest axis, and refreshes the View.