213 lines
14 KiB
ReStructuredText
213 lines
14 KiB
ReStructuredText
|
|
:github_url: hide
|
||
|
|
|
||
|
|
.. DO NOT EDIT THIS FILE!!!
|
||
|
|
.. Generated automatically from GUT Plugin sources.
|
||
|
|
.. Generator: documentation/godot_make_rst.py.
|
||
|
|
.. _class_GutInputFactory:
|
||
|
|
|
||
|
|
GutInputFactory
|
||
|
|
===============
|
||
|
|
|
||
|
|
**Inherits:** `RefCounted <https://docs.godotengine.org/en/stable/classes/class_refcounted.html>`_
|
||
|
|
|
||
|
|
Static class full of helper methods to make InputEvent instances.
|
||
|
|
|
||
|
|
.. rst-class:: classref-introduction-group
|
||
|
|
|
||
|
|
Description
|
||
|
|
-----------
|
||
|
|
|
||
|
|
This thing makes InputEvents. Enjoy.
|
||
|
|
|
||
|
|
.. rst-class:: classref-reftable-group
|
||
|
|
|
||
|
|
Methods
|
||
|
|
-------
|
||
|
|
|
||
|
|
.. table::
|
||
|
|
:widths: auto
|
||
|
|
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventAction <https://docs.godotengine.org/en/stable/classes/class_inputeventaction.html>`_ | :ref:`action_down<class_GutInputFactory_method_action_down>`\ (\ which, strength = 1.0\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventAction <https://docs.godotengine.org/en/stable/classes/class_inputeventaction.html>`_ | :ref:`action_up<class_GutInputFactory_method_action_up>`\ (\ which, strength = 1.0\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventKey <https://docs.godotengine.org/en/stable/classes/class_inputeventkey.html>`_ | :ref:`key_down<class_GutInputFactory_method_key_down>`\ (\ which\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventKey <https://docs.godotengine.org/en/stable/classes/class_inputeventkey.html>`_ | :ref:`key_up<class_GutInputFactory_method_key_up>`\ (\ which\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ | :ref:`mouse_double_click<class_GutInputFactory_method_mouse_double_click>`\ (\ position, global_position = null\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ | :ref:`mouse_left_button_down<class_GutInputFactory_method_mouse_left_button_down>`\ (\ position, global_position = null\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ | :ref:`mouse_left_button_up<class_GutInputFactory_method_mouse_left_button_up>`\ (\ position, global_position = null\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseMotion <https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html>`_ | :ref:`mouse_motion<class_GutInputFactory_method_mouse_motion>`\ (\ position, global_position = null\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseMotion <https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html>`_ | :ref:`mouse_relative_motion<class_GutInputFactory_method_mouse_relative_motion>`\ (\ offset, last_motion_event = null, speed = Vector2(0, 0)\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ | :ref:`mouse_right_button_down<class_GutInputFactory_method_mouse_right_button_down>`\ (\ position, global_position = null\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ | :ref:`mouse_right_button_up<class_GutInputFactory_method_mouse_right_button_up>`\ (\ position, global_position = null\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
| `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ | :ref:`new_mouse_button_event<class_GutInputFactory_method_new_mouse_button_event>`\ (\ position, global_position, pressed, button_index\ ) |static| |
|
||
|
|
+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
|
||
|
|
.. rst-class:: classref-section-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. rst-class:: classref-descriptions-group
|
||
|
|
|
||
|
|
Method Descriptions
|
||
|
|
-------------------
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_new_mouse_button_event:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ **new_mouse_button_event**\ (\ position, global_position, pressed, button_index\ ) |static| :ref:`🔗<class_GutInputFactory_method_new_mouse_button_event>`
|
||
|
|
|
||
|
|
Creates a new button with the given propoerties.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_key_up:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventKey <https://docs.godotengine.org/en/stable/classes/class_inputeventkey.html>`_ **key_up**\ (\ which\ ) |static| :ref:`🔗<class_GutInputFactory_method_key_up>`
|
||
|
|
|
||
|
|
Returns an `InputEventKey <https://docs.godotengine.org/en/stable/classes/class_inputeventkey.html>`_ event with ``pressed = false``. ``which`` can be a character or a ``KEY_*`` constant.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_key_down:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventKey <https://docs.godotengine.org/en/stable/classes/class_inputeventkey.html>`_ **key_down**\ (\ which\ ) |static| :ref:`🔗<class_GutInputFactory_method_key_down>`
|
||
|
|
|
||
|
|
Returns an `InputEventKey <https://docs.godotengine.org/en/stable/classes/class_inputeventkey.html>`_ event with ``pressed = true``. ``which`` can be a character or a ``KEY_*`` constant.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_action_up:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventAction <https://docs.godotengine.org/en/stable/classes/class_inputeventaction.html>`_ **action_up**\ (\ which, strength = 1.0\ ) |static| :ref:`🔗<class_GutInputFactory_method_action_up>`
|
||
|
|
|
||
|
|
Returns an "action up" `InputEventAction <https://docs.godotengine.org/en/stable/classes/class_inputeventaction.html>`_ instance. ``which`` is the name of the action defined in the Key Map.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_action_down:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventAction <https://docs.godotengine.org/en/stable/classes/class_inputeventaction.html>`_ **action_down**\ (\ which, strength = 1.0\ ) |static| :ref:`🔗<class_GutInputFactory_method_action_down>`
|
||
|
|
|
||
|
|
Returns an "action down" `InputEventAction <https://docs.godotengine.org/en/stable/classes/class_inputeventaction.html>`_ instance. ``which`` is the name of the action defined in the Key Map.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_left_button_down:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ **mouse_left_button_down**\ (\ position, global_position = null\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_left_button_down>`
|
||
|
|
|
||
|
|
Returns a "button down" `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ for the left mouse button.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_left_button_up:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ **mouse_left_button_up**\ (\ position, global_position = null\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_left_button_up>`
|
||
|
|
|
||
|
|
Returns a "button up" `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ for the left mouse button.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_double_click:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ **mouse_double_click**\ (\ position, global_position = null\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_double_click>`
|
||
|
|
|
||
|
|
Returns a "double click" `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ for the left mouse button.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_right_button_down:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ **mouse_right_button_down**\ (\ position, global_position = null\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_right_button_down>`
|
||
|
|
|
||
|
|
Returns a "button down" `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ for the right mouse button.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_right_button_up:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ **mouse_right_button_up**\ (\ position, global_position = null\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_right_button_up>`
|
||
|
|
|
||
|
|
Returns a "button up" `InputEventMouseButton <https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html>`_ for the right mouse button.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_motion:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseMotion <https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html>`_ **mouse_motion**\ (\ position, global_position = null\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_motion>`
|
||
|
|
|
||
|
|
Returns a `InputEventMouseMotion <https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html>`_ to move the mouse the specified positions.
|
||
|
|
|
||
|
|
.. rst-class:: classref-item-separator
|
||
|
|
|
||
|
|
----
|
||
|
|
|
||
|
|
.. _class_GutInputFactory_method_mouse_relative_motion:
|
||
|
|
|
||
|
|
.. rst-class:: classref-method
|
||
|
|
|
||
|
|
`InputEventMouseMotion <https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html>`_ **mouse_relative_motion**\ (\ offset, last_motion_event = null, speed = Vector2(0, 0)\ ) |static| :ref:`🔗<class_GutInputFactory_method_mouse_relative_motion>`
|
||
|
|
|
||
|
|
Returns an `InputEventMouseMotion <https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html>`_ that moves the mouse ``offset`` from the last :ref:`mouse_motion<class_GutInputFactory_method_mouse_motion>` or :ref:`mouse_motion<class_GutInputFactory_method_mouse_motion>` call.
|
||
|
|
|
||
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||
|
|
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||
|
|
.. |void| replace:: :abbr:`void (No return value.)`
|