InputEventMouse

Inherits: InputEventWithModifiers < InputEvent < Resource < Reference < Object

Inherited By: InputEventMouseButton, InputEventMouseMotion

Base input event type for mouse events.

Description

Stores general mouse events information.

Tutorials

Properties

intbutton_mask0
Vector2global_positionVector2( 0, 0 )
Vector2positionVector2( 0, 0 )

Property Descriptions

  • int button_mask
Default0
Setterset_button_mask(value)
Getterget_button_mask()

The mouse button mask identifier, one of or a bitwise combination of the ButtonList button masks.


DefaultVector2( 0, 0 )
Setterset_global_position(value)
Getterget_global_position()

The global mouse position relative to the current Viewport when used in Control._gui_input, otherwise is at 0,0.


DefaultVector2( 0, 0 )
Setterset_position(value)
Getterget_position()

The local mouse position relative to the Viewport. If used in Control._gui_input, the position is relative to the current Control which is under the mouse.

doradoro's advice! Getters and Setters will be deprecated! Avoid their use!

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 2020-03-07 at 01:33:25. It's the English Stable version because it's what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.