ShortCut.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ShortCut" inherits="Resource" category="Core" version="3.1">
  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. <demos>
  13. </demos>
  14. <methods>
  15. <method name="get_as_text" qualifiers="const">
  16. <return type="String">
  17. </return>
  18. <description>
  19. Returns the shortcut's [InputEvent] as a [String].
  20. </description>
  21. </method>
  22. <method name="is_shortcut" qualifiers="const">
  23. <return type="bool">
  24. </return>
  25. <argument index="0" name="event" type="InputEvent">
  26. </argument>
  27. <description>
  28. Returns [code]true[/code] if the shortcut's [InputEvent] equals [code]event[/code].
  29. </description>
  30. </method>
  31. <method name="is_valid" qualifiers="const">
  32. <return type="bool">
  33. </return>
  34. <description>
  35. If [code]true[/code], this shortcut is valid.
  36. </description>
  37. </method>
  38. </methods>
  39. <members>
  40. <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
  41. The shortcut's [InputEvent].
  42. Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent].
  43. </member>
  44. </members>
  45. <constants>
  46. </constants>
  47. </class>