Skip to content

Commit 9ffc935

Browse files
bors[bot]jacobsky
andauthored
Merge #785
785: Fixed error in the documentation related to the _input method signatures. r=jacobsky a=jacobsky This was related to an issue that I let slip through during the review process. `InputEvent` is what is exposed in GDScript but the Rust equivalent is `Ref<InputEvent>`. This fixes those typos. Closes #784 Co-authored-by: Jacobsky <jacobsky@users.noreply.github.com>
2 parents cb2bda2 + 4dcde9a commit 9ffc935

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gdnative-derive/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub fn profiled(meta: TokenStream, input: TokenStream) -> TokenStream {
289289
/// <br><br>
290290
///
291291
/// ```ignore
292-
/// fn _get_configuration_warning(&self, owner: &Node);
292+
/// fn _get_configuration_warning(&self, owner: &Node) -> GodotString;
293293
/// ```
294294
/// The string returned from this method is displayed as a warning in the Scene Dock if the script that overrides it is a tool script.
295295
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-get-configuration-warning) for more information._
@@ -310,21 +310,21 @@ pub fn profiled(meta: TokenStream, input: TokenStream) -> TokenStream {
310310
/// <br><br>
311311
///
312312
/// ```ignore
313-
/// fn _input(&self, owner: &Node, event: InputEvent);
313+
/// fn _input(&self, owner: &Node, event: Ref<InputEvent>);
314314
/// ```
315315
/// Called when there is an input event.
316316
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-input) for more information._
317317
/// <br><br>
318318
///
319319
/// ```ignore
320-
/// fn _unhandled_input(&self, owner: &Node, event: InputEvent);
320+
/// fn _unhandled_input(&self, owner: &Node, event: Ref<InputEvent>);
321321
/// ```
322322
/// Called when an `InputEvent` hasn't been consumed by `_input()` or any GUI.
323323
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-unhandled-input) for more information._
324324
/// <br><br>
325325
///
326326
/// ```ignore
327-
/// fn _unhandled_key_input (&self, owner: &Node, event: InputKeyEvent);
327+
/// fn _unhandled_key_input (&self, owner: &Node, event: Ref<InputKeyEvent>);
328328
/// ```
329329
/// Called when an `InputEventKey` hasn't been consumed by `_input()` or any GUI.
330330
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-unhandled-key-input) for more information._
@@ -349,7 +349,7 @@ pub fn profiled(meta: TokenStream, input: TokenStream) -> TokenStream {
349349
/// <br><br>
350350
///
351351
/// ```ignore
352-
/// fn _gui_input(&self, owner: &Control, event: InputEvent);
352+
/// fn _gui_input(&self, owner: &Control, event: Ref<InputEvent>);
353353
/// ```
354354
/// Use this method to process and accept inputs on UI elements.
355355
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-method-gui-input) for more information._

0 commit comments

Comments
 (0)