Mouse script interface
The IMouseObjectType
interface derives from IObjectClass to add APIs specific to the Mouse plugin.
Note this class derives from the object class interface, not the instance interface. Typically it is used through runtime.mouse
instead of the named object.
Mouse APIs
- getMouseX(layerNameOrIndex)
- getMouseY(layerNameOrIndex)
- getMousePosition(layerNameOrIndex)
- Return the current position of the mouse cursor on a layer, given by a case-insensitive string of its name or zero-based index. The parameter can be omitted for the default mouse position, which does not take in to account any specific layer's transformations.
getMousePosition()
returns both the X and Y position as [x, y]
.
- isMouseButtonDown(button)
- Return a boolean indicating if the given mouse button is currently down. The button is specified the same way as the MouseEvent.button property, i.e. 0 for left, 1 for middle, and 2 for right.
Construct 3 Manual
Construct.net
2019-06-03
2020-04-27
You are here:
Search this manual:
This manual entry was last updated on 27 Apr, 2020 at 20:42