GameMaker:Click Areas

From GMG Manual

Jump to: navigation, search

Click areas are rectangular spots in the graphics area that a user can click on to perform an action, similar to a button. Up to 6 click areas can be placed per card. It is possible to make the click area's existence visible to the player by making the cursor change whenever the mouse pointer hovers over it. The default cursors available are:

Standard Arrow - Normal cursor
Up Arrow - A bold black arrow with a white outline pointing up
Down Arrow - A bold black arrow with a white outline pointing down
Left Arrow - A bold black arrow with a white outline pointing left
Right Arrow - A bold black arrow with a white outline pointing right
Hand - An open hand, appearing as if it is about to "grab" the object underneath, useful for a grab interaction
Pointing Hand - A hand, pointing to the object, useful for button interactions
Magnifying Glass - An opaque (doesn't actually magnify) magnifying glass, useful for examine commands
Speak Bubble - A speech bubble, useful for dialog interactions

In addition, any labeled "crsr" id in the resource fork of your game document numbered between 1010 and 1019 show up in the list of cursors to choose from. You can edit these by opening your game document in ResEdit (MacOS 7-9) or Rezilla (Mac OS X).

It is possible to invert the colors of the space under the click area when clicked, or cause the button to perform its actions immediately when pressed instead of waiting for the player to lift the mouse button over the click area as confirmation.

A click area's abilities are slightly more limited than card buttons:

[edit] See Also

SETCURSOR

Personal tools