Class CanvasObject
Extends
Movable.
Defined in: arcade-controls.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for screen controls.
|
Field Attributes | Field Name and Description |
---|---|
Return true, if point hits this object.
|
|
Called when button was clicked (i.e.
|
- Fields borrowed from class Movable:
- clipModeX, clipModeY, game, hidden, id, orientation, pos, scale, type, useCC
Method Attributes | Method Name and Description |
---|---|
init(type, opts)
|
|
onResize(width, height, e)
|
- Methods borrowed from class Movable:
- contains, die, driveToPosition, getActivity, getBoundingBox, getBoundingCircle, intersectsWith, isActivity, isDead, later, setActivity, toString, turnToDirection
- Events borrowed from class Movable:
- onDie, onDrag, onDragcancel, onDragstart, onDrop, onKeydown, onKeypress, onKeyup, onMousewheel, onSetActivity, onTimeout, onTouchevent, render, step
Class Detail
CanvasObject()
Base class for screen controls.
As opposed to a 'normal' Movable, this class sets pos to `undefined` and uses
posCC instead.
Field Detail
{boolean}
containsCC
Return true, if point hits this object.
onClick
Called when button was clicked (i.e. pushed and released).
Method Detail
init(type, opts)
- Parameters:
- type
- opts
onResize(width, height, e)
- Parameters:
- {Int} width
- {Int} height
- {Event} e
- Returns:
- false to prevent default handling