Compute the line style index lists.
Each line style will be splitted into two parts, the width and the fill.
Then, the fills will be added to the fillStyles and the indexes will be adjusted.
Finally, we compute two arrays containing the width of each line and the
fill style of each line
Associate an action list with the given button:
buttonId: global ID of the button
actions: Collection of MessageSends (e.g., actions)
condition: bit mask describing when the actions should be applied
General conditions:
1 - IdleToOverUp (Mouse enter up)
2 - OverUpToIdle (Mouse exit up)
4 - OverUpToOverDown (Mouse down)
8 - OverDownToOverUp (Mouse up in)
Push button conditions:
16 - OverDownToOutDown (Mouse exit down)
32 - OutDownToOverDown (Mouse enter down)
64 - OutDownToIdle (Mouse up out)
Menu button conditions:
128 - IdleToOverDown (Mouse enter down)
256 - OverDownToIdle (Mouse exit down)
Define the character to use for a button.
buttonId: global ID used for the button
characterId: ID of the character defining the shape for the button
state: bit mask for when to use the character
1 - default (e.g. no other state applies)
2 - display when the mouse is over the button but not pressed
4 - display when the button is pressed
8 - the area in which the mouse is supposed to be 'over' the button
layer: UNKNOWN.
matrix: Transformation to apply to the character. (Guess!)
Track the button with the given ID as a menu (in contrast to a push) button. Push buttons capture the mouse until the button is released. Menu buttons don't.
Note: If defined for a button, this method will be called prior to any other #recordButton: methods.
Return a new character morph from the given object index.
If the character morph at objectIndex is already used, then create and return a full copy of it