GutInputFactory

Inherits: RefCounted

Static class full of helper methods to make InputEvent instances.

Description

This thing makes InputEvents. Enjoy.

Methods

InputEventAction

action_down(which, strength = 1.0) static

InputEventAction

action_up(which, strength = 1.0) static

InputEventKey

key_down(which) static

InputEventKey

key_up(which) static

InputEventMouseButton

mouse_double_click(position, global_position = null) static

InputEventMouseButton

mouse_left_button_down(position, global_position = null) static

InputEventMouseButton

mouse_left_button_up(position, global_position = null) static

InputEventMouseMotion

mouse_motion(position, global_position = null) static

InputEventMouseMotion

mouse_relative_motion(offset, last_motion_event = null, speed = Vector2(0, 0)) static

InputEventMouseButton

mouse_right_button_down(position, global_position = null) static

InputEventMouseButton

mouse_right_button_up(position, global_position = null) static

InputEventMouseButton

new_mouse_button_event(position, global_position, pressed, button_index) static


Method Descriptions

InputEventMouseButton new_mouse_button_event(position, global_position, pressed, button_index) static 🔗

Creates a new button with the given propoerties.


InputEventKey key_up(which) static 🔗

Returns an InputEventKey event with pressed = false. which can be a character or a KEY_* constant.


InputEventKey key_down(which) static 🔗

Returns an InputEventKey event with pressed = true. which can be a character or a KEY_* constant.


InputEventAction action_up(which, strength = 1.0) static 🔗

Returns an “action up” InputEventAction instance. which is the name of the action defined in the Key Map.


InputEventAction action_down(which, strength = 1.0) static 🔗

Returns an “action down” InputEventAction instance. which is the name of the action defined in the Key Map.


InputEventMouseButton mouse_left_button_down(position, global_position = null) static 🔗

Returns a “button down” InputEventMouseButton for the left mouse button.


InputEventMouseButton mouse_left_button_up(position, global_position = null) static 🔗

Returns a “button up” InputEventMouseButton for the left mouse button.


InputEventMouseButton mouse_double_click(position, global_position = null) static 🔗

Returns a “double click” InputEventMouseButton for the left mouse button.


InputEventMouseButton mouse_right_button_down(position, global_position = null) static 🔗

Returns a “button down” InputEventMouseButton for the right mouse button.


InputEventMouseButton mouse_right_button_up(position, global_position = null) static 🔗

Returns a “button up” InputEventMouseButton for the right mouse button.


InputEventMouseMotion mouse_motion(position, global_position = null) static 🔗

Returns a InputEventMouseMotion to move the mouse the specified positions.


InputEventMouseMotion mouse_relative_motion(offset, last_motion_event = null, speed = Vector2(0, 0)) static 🔗

Returns an InputEventMouseMotion that moves the mouse offset from the last mouse_motion or mouse_motion call.