API Docs for:
Show:

Object_Hotspot Class

Module: ui

A hotspot object to define an area on the screen which can respond to user-actions like mouse/touch actions. A hotspot can have multiple images for different states like hovered, selected, etc.

Properties

angle

Number

Provided by the gs module.

The rotation-angle of the picture in degrees. The rotation center depends on the anchor-point.

behavior

gs.Component_HotspotBehavior

Provided by the gs module.

A behavior-component to hotspot-specific behavior to the object.

behavior

gs.Component_HotspotBehavior

A behavior-component to hotspot-specific behavior to the object.

bitmap

gs.Bitmap

The UI object's bitmap used for visual presentation.

color

gs.Color

Provided by the gs module.

The color of the object used for the visual presentation.

domain

String

Provided by the gs module.

The domain the object belongs to.

effects

Object

Provided by the gs module.

Contains different kinds of effects which can be activated for the object.

enabled.

Boolean

Provided by the gs module.

Indicates if the hotspot is enabled. A disabled hotspot will not fire any events/actions.

events

gs.Component_EventEmitter

Provided by the gs module.

An event-emitter to emit events.

image

String

Provided by the gs module.

The object's image used for visual presentation.

imageHandling

gs.ImageHandling

Provided by the gs module.

The object's image-handling.

imageHandling

gs.ImageHandling

The object's image-handling.

images

String

Provided by the gs module.

The names of the images for the different states of the hotspot. At least one image needs to be set. The other ones are optional and used for the following:

  • 0 = Base (Required)
  • 1 = Hovered
  • 2 = Unselected
  • 3 = Selected
  • 4 = Selected Hovered

mask

gs.Mask

Provided by the gs module.

The object's mask to execute masking-effects on it.

mirror

Boolean

Provided by the gs module.

Indicates if the object's visual presentation should be mirrored horizontally.

selectable

Boolean

Provided by the gs module.

Indicates if the hotspot is selectable by mouse/touch.

srcRect

gs.Rect

Provided by the gs module.

The object's source rectangle. It controls which part of the object's image is used for visual presentation.

srcRect

gs.Rect

The UI object's source rectangle on screen.

target

gs.Object_Visual

Provided by the gs module.

The hotspot's target. The target it optional but if set the hotspot follows the target. For example: A hotspot could be follow moving picture.

tone

gs.Tone

Provided by the gs module.

The color tone of the object used for the visual presentation.

visual

gs.Component_Frame

The UI object's visual-component to display the game object on screen.

visual

gs.Component_Sprite

Provided by the gs module.

The object's visual-component to display the game object on screen.