ShortCut.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ShortCut" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  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. <description>
  16. Returns the shortcut's [InputEvent] as a [String].
  17. </description>
  18. </method>
  19. <method name="is_shortcut" qualifiers="const">
  20. <return type="bool" />
  21. <argument index="0" name="event" type="InputEvent" />
  22. <description>
  23. Returns [code]true[/code] if the shortcut's [InputEvent] equals [code]event[/code].
  24. </description>
  25. </method>
  26. <method name="is_valid" qualifiers="const">
  27. <return type="bool" />
  28. <description>
  29. If [code]true[/code], this shortcut is valid.
  30. </description>
  31. </method>
  32. </methods>
  33. <members>
  34. <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
  35. The shortcut's [InputEvent].
  36. Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent].
  37. </member>
  38. </members>
  39. <constants>
  40. </constants>
  41. </class>