-
Notifications
You must be signed in to change notification settings - Fork 210
Added Godot exportable methods along with the expected signature #781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2fcff8c
to
477a5d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the exhaustive list and all the detailed links!
As usual, the structure is very good, the comments concern just some typos/nitpicks 🙂
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 closes godot-rust#672
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 closes godot-rust#672
@Bromeon I've gone ahead and fixed up everything that you asked for. Let me know if you think anything else is needed. |
That makes it much clearer which parts belong together. Here's the code, so you don't have to constantly micro-adjust things./// This is a list of common Godot virtual functions that are automatically called via [notifications](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification):
/// <br><br>
///
/// ```
/// fn _ready(&self, owner: &Node);
/// ```
/// Called when both the node and its children have entered the scene tree.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-ready) for more information._
/// <br><br>
///
/// ```
/// fn _enter_tree(&self, owner: &Node);
/// ```
/// Called when the node enters the scene tree.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-enter-tree) for more information._
/// <br><br>
///
/// ```
/// fn _exit_tree(&self, owner: &Node);
/// ```
/// Called when the node is removed from the scene tree.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-exit-tree) for more information._
/// <br><br>
///
/// ```
/// fn _get_configuration_warning(&self, owner: &Node);
/// ```
/// 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.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-get-configuration-warning) for more information._
/// <br><br>
///
/// ```
/// fn _process(&mut self, owner: &Node, delta: f64);
/// ```
/// Called during processing step of the main loop.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-process) for more information._
/// <br><br>
///
/// ```
/// fn _physics_process(&self, owner: &Node, delta: f64);
/// ```
/// Called during physics update, with a fixed timestamp.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-physics-process) for more information._
/// <br><br>
///
/// ```
/// fn _input(&self, owner: &Node, event: InputEvent);
/// ```
/// Called when there is an input event.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-input) for more information._
/// <br><br>
///
/// ```
/// fn _unhandled_input(&self, owner: &Node, event: InputEvent);
/// ```
/// Called when an `InputEvent` hasn't been consumed by `_input()` or any GUI.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-unhandled-input) for more information._
/// <br><br>
///
/// ```
/// fn _unhandled_key_input (&self, owner: &Node, event: InputKeyEvent);
/// ```
/// Called when an `InputEventKey` hasn't been consumed by `_input()` or any GUI.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-unhandled-key-input) for more information._
/// <br><br>
///
/// #### `Control` virtual functions
///
/// This is a list of common Godot virtual functions that are automatically called via [notifications](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification).
///
/// ```
/// fn _clips_input(&self, owner: &Control) -> bool;
/// ```
/// Returns whether `_gui_input()` should not be called for children controls outside this control's rectangle.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-method-clips-input) for more information._
/// <br><br>
///
/// ```
/// fn _get_minimum_size(&self, owner: &Control) -> Vector2;
/// ```
/// Returns the minimum size for this control.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-method-get-minimum-size) for more information._
/// <br><br>
///
/// ```
/// fn _gui_input(&self, owner: &Control, event: InputEvent);
/// ```
/// Use this method to process and accept inputs on UI elements.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-method-gui-input) for more information._
/// <br><br>
///
/// ```
/// fn _make_custom_tooltip(&self, owner: &Control, for_text: String) -> Ref<Control>;
/// ```
/// Returns a `Control` node that should be used as a tooltip instead of the default one.
/// _See [Godot docs](https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-method-make-custom-tooltip) for more information._
/// <br><br>
|
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 closes godot-rust#672
@Bromeon Thank you very much, I've included the changes in my latest push. |
bors try |
tryBuild failed: |
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 Fixed the doc test failures. closes godot-rust#672
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 Fixed the doc test failures. closes godot-rust#672
bors try |
tryBuild succeeded: |
Let's try with the new workflow 🚀 |
tryBuild succeeded: |
bors r+ |
Build succeeded: |
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 Fixed the doc test failures. closes godot-rust#672
…o the Godot Docs in the #[export] trait documentation. Also fixed up as per the requests in PR godot-rust#781 Fixed the doc test failures. closes godot-rust#672
Added a list of the Godot Virtual methods from Node and Control to the #[export] trait documentation.
closes #672