class_inputeventaction.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InputEventAction.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InputEventAction:
  6. InputEventAction
  7. ================
  8. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Input event type for actions.
  13. Properties
  14. ----------
  15. +-----------------------------+---------------------------------------------------------+
  16. | :ref:`String<class_String>` | :ref:`action<class_InputEventAction_property_action>` |
  17. +-----------------------------+---------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventAction_property_pressed>` |
  19. +-----------------------------+---------------------------------------------------------+
  20. Description
  21. -----------
  22. Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu ``Project > Project Settings > Input Map``. See :ref:`Node._input<class_Node_method__input>`.
  23. Tutorials
  24. ---------
  25. - `#actions <../tutorials/inputs/inputevent.html#actions>`_ in :doc:`../tutorials/inputs/inputevent`
  26. Property Descriptions
  27. ---------------------
  28. .. _class_InputEventAction_property_action:
  29. - :ref:`String<class_String>` **action**
  30. +----------+-------------------+
  31. | *Setter* | set_action(value) |
  32. +----------+-------------------+
  33. | *Getter* | get_action() |
  34. +----------+-------------------+
  35. The action's name. Actions are accessed via this :ref:`String<class_String>`.
  36. ----
  37. .. _class_InputEventAction_property_pressed:
  38. - :ref:`bool<class_bool>` **pressed**
  39. +----------+--------------------+
  40. | *Setter* | set_pressed(value) |
  41. +----------+--------------------+
  42. | *Getter* | is_pressed() |
  43. +----------+--------------------+
  44. If ``true``, the action's state is pressed. If ``false``, the action's state is released.