Rt2dMaestroAddButton is used to add
a single button to the maestro. The maestro maintains a central
repository for all buttons that exist in the scene. An index
reference for the button is returned. This index can be added to
any cels that requires the button, allowing the button to be shared
between cels.
A button requires a label for indentification and an object.
Both are given as indices to the maestro's label table and scene
respectively. The stateFlag lists the available states and
transition states. For every possible transition there must be a
corresponding index in the message index list. The entries in the
message list index must match the order of the transition states in
the stateFlag.
The button's index in the maestro is returned if index is not
NULL.
- Parameters:
-
maestro |
Pointer to parent maestro. |
strLabelIdx |
Index to the label in the maestro. |
objectIdx |
Index to an object in the maestro's scene. |
stateFlag |
Button's state. |
actionListIdx |
List of indices to messages in the maestro. |
index |
Pointer to a RwInt32 to return the button's index in the
maestro. |
- Returns:
- Returns a pointer to the maestro if successful, NULL
otherwise.
- See also:
- Rt2dMaestroAddStringLabel ,
Rt2dCelListLock ,
Rt2dCelAddButtonIndex
|