ShortCut.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ShortCut" inherits="Resource" version="3.4">
  3. <brief_description>
  4. A shortcut for binding input.
  5. </brief_description>
  6. <description>
  7. A shortcut for binding input.
  8. Shortcuts are commonly used for interacting with a [Control] element from a [InputEvent].
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="get_as_text" qualifiers="const">
  14. <return type="String">
  15. </return>
  16. <description>
  17. Returns the shortcut's [InputEvent] as a [String].
  18. </description>
  19. </method>
  20. <method name="is_shortcut" qualifiers="const">
  21. <return type="bool">
  22. </return>
  23. <argument index="0" name="event" type="InputEvent">
  24. </argument>
  25. <description>
  26. Returns [code]true[/code] if the shortcut's [InputEvent] equals [code]event[/code].
  27. </description>
  28. </method>
  29. <method name="is_valid" qualifiers="const">
  30. <return type="bool">
  31. </return>
  32. <description>
  33. If [code]true[/code], this shortcut is valid.
  34. </description>
  35. </method>
  36. </methods>
  37. <members>
  38. <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
  39. The shortcut's [InputEvent].
  40. Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent].
  41. </member>
  42. </members>
  43. <constants>
  44. </constants>
  45. </class>