summaryrefslogtreecommitdiff
path: root/doc/classes/Input.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Input.xml')
-rw-r--r--doc/classes/Input.xml20
1 files changed, 14 insertions, 6 deletions
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 2e619802e3..5d1d763ae3 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -299,12 +299,20 @@
<description>
Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls.
Example:
- [codeblock]
- var a = InputEventAction.new()
- a.action = "ui_cancel"
- a.pressed = true
- Input.parse_input_event(a)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var cancel_event = InputEventAction.new()
+ cancel_event.action = "ui_cancel"
+ cancel_event.pressed = true
+ Input.parse_input_event(cancel_event)
+ [/gdscript]
+ [csharp]
+ var cancelEvent = new InputEventAction();
+ cancelEvent.Action = "ui_cancel";
+ cancelEvent.Pressed = true;
+ Input.ParseInputEvent(cancelEvent);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="remove_joy_mapping">