InputMap.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 actions.
  5. </brief_description>
  6. <description>
  7. </description>
  8. <tutorials>
  9. </tutorials>
  10. <demos>
  11. </demos>
  12. <methods>
  13. <method name="action_add_event">
  14. <return type="void">
  15. </return>
  16. <argument index="0" name="action" type="String">
  17. </argument>
  18. <argument index="1" name="event" type="InputEvent">
  19. </argument>
  20. <description>
  21. Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
  22. </description>
  23. </method>
  24. <method name="action_erase_event">
  25. <return type="void">
  26. </return>
  27. <argument index="0" name="action" type="String">
  28. </argument>
  29. <argument index="1" name="event" type="InputEvent">
  30. </argument>
  31. <description>
  32. Remove an [InputEvent] from an action.
  33. </description>
  34. </method>
  35. <method name="action_has_event">
  36. <return type="bool">
  37. </return>
  38. <argument index="0" name="action" type="String">
  39. </argument>
  40. <argument index="1" name="event" type="InputEvent">
  41. </argument>
  42. <description>
  43. Whether an action has an [InputEvent] associated with it.
  44. </description>
  45. </method>
  46. <method name="add_action">
  47. <return type="void">
  48. </return>
  49. <argument index="0" name="action" type="String">
  50. </argument>
  51. <description>
  52. Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
  53. </description>
  54. </method>
  55. <method name="erase_action">
  56. <return type="void">
  57. </return>
  58. <argument index="0" name="action" type="String">
  59. </argument>
  60. <description>
  61. Remove an action from the [InputMap].
  62. </description>
  63. </method>
  64. <method name="event_is_action" qualifiers="const">
  65. <return type="bool">
  66. </return>
  67. <argument index="0" name="event" type="InputEvent">
  68. </argument>
  69. <argument index="1" name="action" type="String">
  70. </argument>
  71. <description>
  72. Return whether 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.
  73. </description>
  74. </method>
  75. <method name="get_action_list">
  76. <return type="Array">
  77. </return>
  78. <argument index="0" name="action" type="String">
  79. </argument>
  80. <description>
  81. Return an array of InputEvents associated with a given action.
  82. </description>
  83. </method>
  84. <method name="get_actions">
  85. <return type="Array">
  86. </return>
  87. <description>
  88. Return an array of all actions in the [InputMap].
  89. </description>
  90. </method>
  91. <method name="has_action" qualifiers="const">
  92. <return type="bool">
  93. </return>
  94. <argument index="0" name="action" type="String">
  95. </argument>
  96. <description>
  97. Whether this InputMap has a registered action with the given name.
  98. </description>
  99. </method>
  100. <method name="load_from_globals">
  101. <return type="void">
  102. </return>
  103. <description>
  104. Clear the [InputMap] and load it anew from [ProjectSettings].
  105. </description>
  106. </method>
  107. </methods>
  108. <constants>
  109. </constants>
  110. </class>