Button
From MegaZine3
| ASUL Component | |
|---|---|
| Tag name | button
|
| Extends | Box |
A button can have a normal state, an mouse over state, and a mouse down state. At least the normal state must be given for proper functionality.
Contents |
Attributes
|
|
See: Box and AbstractAsulObject for inherited attributes. |
This component does not define any attributes.
Child nodes
$up$
- Type: any AbstractAsulObject, required
The normal state of the button, i.e. the graphic used when the button is in its normal state (mouse not over the button).
$over$
- Type: any AbstractAsulObject
The over state of the button, i.e. the graphic used when the button is hovered.
$down$
- Type: any AbstractAsulObject
The down state of this button, i.e. the graphic used when the button is currently being pressed (left mouse button currently down).
Example
<button anchors="0,0,pw,ph"> <box name="$up$" background="color(0x990000)" anchors="0,0,pw,ph"/> <box name="$over$" background="color(0x009900)" anchors="0,0,pw,ph"/> <box name="$down$" background="image(http://www.megazine3.de/wiki/mz3wiki.png)" anchors="0,0,pw,ph"/> </button>
| ASUL-related articles | |
|---|---|
| Components | Box · Button · ProgressBar · ScrollBar · ScrollPane · Text · ToggleButton · Window |
| Layouts | Horizontal Flow Layout · Vertical Flow Layout |
| ASUL Articles | ASUL Document · Editing the GUI · Layouting · ASUL scripting |