Button

From MegaZine3
Jump to: navigation, search
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

This component does not define any attributes.

Child nodes

$up$

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$

The over state of the button, i.e. the graphic used when the button is hovered.

$down$

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>
Results in the following:
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
Personal tools
Namespaces
Variants
Actions
Navigation
documentation
miscellaneous
Toolbox