InputMap.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="InputMap" inherits="Object" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Singleton that manages [InputEventAction].
  5. </brief_description>
  6. <description>
  7. Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project &gt; Project Settings &gt; Input Map[/Code] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
  8. </description>
  9. <tutorials>
  10. http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html#inputmap
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="action_add_event">
  16. <return type="void">
  17. </return>
  18. <argument index="0" name="action" type="String">
  19. </argument>
  20. <argument index="1" name="event" type="InputEvent">
  21. </argument>
  22. <description>
  23. Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
  24. </description>
  25. </method>
  26. <method name="action_erase_event">
  27. <return type="void">
  28. </return>
  29. <argument index="0" name="action" type="String">
  30. </argument>
  31. <argument index="1" name="event" type="InputEvent">
  32. </argument>
  33. <description>
  34. Removes an [InputEvent] from an action.
  35. </description>
  36. </method>
  37. <method name="action_has_event">
  38. <return type="bool">
  39. </return>
  40. <argument index="0" name="action" type="String">
  41. </argument>
  42. <argument index="1" name="event" type="InputEvent">
  43. </argument>
  44. <description>
  45. Returns [true] if an action has an [InputEvent] associated with it.
  46. </description>
  47. </method>
  48. <method name="add_action">
  49. <return type="void">
  50. </return>
  51. <argument index="0" name="action" type="String">
  52. </argument>
  53. <description>
  54. Adds an (empty) action to the [code]InputMap[/code]. An [InputEvent] can then be added to this action with [method action_add_event].
  55. </description>
  56. </method>
  57. <method name="erase_action">
  58. <return type="void">
  59. </return>
  60. <argument index="0" name="action" type="String">
  61. </argument>
  62. <description>
  63. Removes an action from the [code]InputMap[/code].
  64. </description>
  65. </method>
  66. <method name="event_is_action" qualifiers="const">
  67. <return type="bool">
  68. </return>
  69. <argument index="0" name="event" type="InputEvent">
  70. </argument>
  71. <argument index="1" name="action" type="String">
  72. </argument>
  73. <description>
  74. Returns [true] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
  75. </description>
  76. </method>
  77. <method name="get_action_list">
  78. <return type="Array">
  79. </return>
  80. <argument index="0" name="action" type="String">
  81. </argument>
  82. <description>
  83. Returns an array of [InputEvent]s associated with a given action.
  84. </description>
  85. </method>
  86. <method name="get_actions">
  87. <return type="Array">
  88. </return>
  89. <description>
  90. Returns an array of all actions in the [code]InputMap[/code].
  91. </description>
  92. </method>
  93. <method name="has_action" qualifiers="const">
  94. <return type="bool">
  95. </return>
  96. <argument index="0" name="action" type="String">
  97. </argument>
  98. <description>
  99. Returns [code]true[/code] if the [code]InputMap[/code] has a registered action with the given name.
  100. </description>
  101. </method>
  102. <method name="load_from_globals">
  103. <return type="void">
  104. </return>
  105. <description>
  106. Clears all [InputEventAction] in the [code]InputMap[/code] and load it anew from [ProjectSettings].
  107. </description>
  108. </method>
  109. </methods>
  110. <constants>
  111. </constants>
  112. </class>