MouseInputEvent

class Communicator.Event.MouseInputEvent()

Constructors


Constructors

MouseInputEvent.constructor(positionX, positionY, button, buttons, modifiers, inputType)

Mouse Event class

Arguments
Return type

MouseInputEvent()

Methods

altDown

MouseInputEvent.altDown()

gets the state of the alt key

Return type

boolean

Returns

whether the alt key was down when this event was generated

commandDown

MouseInputEvent.commandDown()

gets the state of the command key

Return type

boolean

Returns

whether the command key was down when this event was generated

controlDown

MouseInputEvent.controlDown()

gets the state of the control key

Return type

boolean

Returns

whether the control key was down when this event was generated

getButton

MouseInputEvent.getButton()

gets the mouse button associated with this event

Return type

Button

Returns

the mouse button for this event

getButtons

MouseInputEvent.getButtons()

gets the mouse buttons currently pressed with this event

Return type

Buttons

Returns

the mouse buttons currently pressed for this event

getDate

MouseInputEvent.getDate()

Gets the Date this event occurred

Return type

Date

Returns

the event Date

getEventType

MouseInputEvent.getEventType()

gets the event type

Return type

MouseInputType

Returns

the type of mouse event

getHandled

MouseInputEvent.getHandled()

Gets the handled state of the event

Return type

boolean

Returns

whether the event has been handled

getModifiers

MouseInputEvent.getModifiers()

gets the event modifiers

Return type

KeyModifiers

Returns

bitwise combination of KeyModifiers

getPosition

MouseInputEvent.getPosition()

gets the window position of the mouse pointer for this event

Return type

Point2()

Returns

the mouse position for this event

setHandled

MouseInputEvent.setHandled(handled)

Sets the handled state of the event. When an event has been handled it will not propagate any further

Arguments
  • handled (boolean()) – Indicates whether this event has been handled.

Return type

void

shiftDown

MouseInputEvent.shiftDown()

gets the state of the shift key

Return type

boolean

Returns

whether the shift key was down when this event was generated