diff --git a/src/godot-api/functions.md b/src/godot-api/functions.md index a3b83f4..b6904ee 100644 --- a/src/godot-api/functions.md +++ b/src/godot-api/functions.md @@ -169,11 +169,11 @@ match result { } ``` -[api-acceptdialog-add-button-ex]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.AcceptDialog.html#method.add_button_ex -[api-acceptdialog-add-button]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.AcceptDialog.html#method.add_button -[api-classes]: https://godot-rust.github.io/docs/gdext/master/godot/engine/index.html +[api-acceptdialog-add-button-ex]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.AcceptDialog.html#method.add_button_ex +[api-acceptdialog-add-button]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.AcceptDialog.html#method.add_button +[api-classes]: https://godot-rust.github.io/docs/gdext/master/godot/classes/index.html [godot-acceptdialog-add-button]: https://docs.godotengine.org/en/stable/classes/class_acceptdialog.html#class-acceptdialog-method-add-button [issue-singleton-no-receiver]: https://github.com/godot-rust/gdext/issues/127 [godot-object-call]: https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-call -[api-object-call]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Object.html#method.call -[api-object-trycall]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Object.html#method.try_call +[api-object-call]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Object.html#method.call +[api-object-trycall]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Object.html#method.try_call diff --git a/src/intro/hello-world.md b/src/intro/hello-world.md index e1d87b7..b963091 100644 --- a/src/intro/hello-world.md +++ b/src/intro/hello-world.md @@ -261,7 +261,7 @@ Rust does not natively support inheritance, but the gdext API emulates it to a c ### Class declaration -In this example, we declare a class called `Player`, which inherits [`Sprite2D`][api-sprite2d] (a node type): +In this example, we declare a class called `Player`, which inherits [`Sprite2D`][api-class-sprite2d] (a node type): ```rust use godot::prelude::*; @@ -279,7 +279,7 @@ struct Player { Let's break this down. -1. The gdext prelude contains the most common symbols. Less frequent classes are located in the [`engine`][api-engine] module. +1. The gdext prelude contains the most common symbols. Less frequent classes are located in the [`engine`][api-class-engine] module. 2. The `#[derive]` attribute registers `Player` as a class in the Godot engine. See [API docs][api-derive-godotclass] for details about `#[derive(GodotClass)]`. @@ -375,7 +375,7 @@ the base class methods. ``` This is a point where you can see the result. Compile your code and launch the Godot editor. -Right click on your `Sprite2D` in the scene tree, and choose "Change Type..." +Right-click on your `Sprite2D` in the scene tree, and choose "Change Type..." Find and choose the `Player` node type, which will be a child of `Sprite2D` in the Change Type dialog that appears. Now, save your changes, and run the scene. The sprite should rotate at a constant speed. @@ -462,23 +462,23 @@ API attributes typically follow the GDScript keyword names: `class`, `func`, `si That's it for the _Hello World_ tutorial! The following chapters will go into more detail about the various features that gdext provides. +[api-class-engine]: https://godot-rust.github.io/docs/gdext/master/godot/classes/index.html +[api-class-sprite2d]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Sprite2D.html [api-derive-godotclass]: https://godot-rust.github.io/docs/gdext/master/godot/register/derive.GodotClass.html -[api-engine]: https://godot-rust.github.io/docs/gdext/master/godot/engine/index.html [api-extensionlibrary]: https://godot-rust.github.io/docs/gdext/master/godot/prelude/trait.ExtensionLibrary.html [api-godot]: https://godot-rust.github.io/docs/gdext/master/godot/index.html [api-prelude]: https://godot-rust.github.io/docs/gdext/master/godot/prelude/index.html -[api-sprite2d]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Sprite2D.html [compatibility]: ../toolchain/compatibility.md +[directory-setup]: https://godot-rust.github.io/book/intro/hello-world.html#directory-setup +[gd-ignore]: https://docs.godotengine.org/en/stable/tutorials/best_practices/project_organization.html#ignoring-specific-folders +[gdextension-reloadable]: https://github.com/godotengine/godot/pull/80284 [godot-build-targets]: https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html#using-the-gdextension-module +[godot-command-line]: https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html [godot-resource-paths]: https://docs.godotengine.org/en/stable/tutorials/scripting/resources.html#external-vs-built-in [img-sprite-moving]: https://docs.godotengine.org/en/stable/_images/scripting_first_script_rotating_godot.gif [img-sprite-rotating]: https://docs.godotengine.org/en/stable/_images/scripting_first_script_godot_turning_in_place.gif [issue-no-reload]: https://github.com/godotengine/godot/issues/66231 [tutorial-begin]: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting_first_script.html [tutorial-full-script]: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting_first_script.html#complete-script -[gd-ignore]: https://docs.godotengine.org/en/stable/tutorials/best_practices/project_organization.html#ignoring-specific-folders -[directory-setup]: https://godot-rust.github.io/book/intro/hello-world.html#directory-setup [versioning]: https://godot-rust.github.io/book/toolchain/godot-version.html [wikipedia-ffi]: https://en.wikipedia.org/wiki/Foreign_function_interface -[gdextension-reloadable]: https://github.com/godotengine/godot/pull/80284 -[godot-command-line]: https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html diff --git a/src/recipes/engine-singleton.md b/src/recipes/engine-singleton.md index 3246a5e..ee18527 100644 --- a/src/recipes/engine-singleton.md +++ b/src/recipes/engine-singleton.md @@ -18,7 +18,7 @@ users as well. Read more about criticisms [here][singleton-crit]. ``` -An engine singleton is registered through [`godot::classes::Engine`][api-engine]. +An engine singleton is registered through [`godot::classes::Engine`][api-class-engine]. Custom engine singletons in Godot: @@ -28,10 +28,10 @@ Custom engine singletons in Godot: Godot provides _many_ built-in singletons in its API. You can find a full list [here][godot-singleton-list]. -[singleton]: https://en.wikipedia.org/wiki/Singleton_pattern -[singleton-crit]: https://en.wikipedia.org/wiki/Singleton_pattern#Criticism -[api-engine]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Engine.html +[api-class-engine]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Engine.html [godot-singleton-list]: https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#properties +[singleton-crit]: https://en.wikipedia.org/wiki/Singleton_pattern#Criticism +[singleton]: https://en.wikipedia.org/wiki/Singleton_pattern ## Table of contents @@ -134,7 +134,7 @@ godot::classes::Engine::singleton() For more information on this method, refer to [the API docs][method-get-singleton]. -[method-get-singleton]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Engine.html#method.get_singleton +[method-get-singleton]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Engine.html#method.get_singleton ## Singletons and the `SceneTree` diff --git a/src/register/functions.md b/src/register/functions.md index c1b2845..9d6d594 100644 --- a/src/register/functions.md +++ b/src/register/functions.md @@ -178,5 +178,5 @@ These are just a few use cases, you are very flexible in how you design your int In the next page, we will look into a special kind of functions: constructors. [api-godot-api]: https://godot-rust.github.io/docs/gdext/master/godot/register/attr.godot_api.html -[api-inode3d]: https://godot-rust.github.io/docs/gdext/master/godot/engine/trait.INode3D.html +[api-inode3d]: https://godot-rust.github.io/docs/gdext/master/godot/classes/trait.INode3D.html [godot-gdscript-functions]: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#functions diff --git a/src/register/signals.md b/src/register/signals.md index 0a9586f..669f48f 100644 --- a/src/register/signals.md +++ b/src/register/signals.md @@ -17,6 +17,6 @@ As an alternative, you can use Godot's dynamic API to register signals. The [`Ob See also [GDScript reference for signals][godot-gdscript-signals]. -[api-object]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Object.html +[api-object]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Object.html [api-signal]: https://godot-rust.github.io/docs/gdext/master/godot/register/derive.GodotClass.html#signals [godot-gdscript-signals]: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#signals diff --git a/src/register/virtual-functions.md b/src/register/virtual-functions.md index b832d67..81160cc 100644 --- a/src/register/virtual-functions.md +++ b/src/register/virtual-functions.md @@ -227,8 +227,8 @@ you run Godot with the Mono runtime. The library also provides a dedicated trait [`ScriptInstance`][api-scriptinstance], which allows users to provide Rust-based "scripts". Consult its docs for detailed information. -You can also configure scripts entirely programmatically, using the [`engine::Script`][api-engine-script] API and its inherited classes, such -as [`engine::GDScript`][api-engine-gdscript]. This typically defeats the purpose of scripting, but is mentioned here for completeness. +You can also configure scripts entirely programmatically, using the [`engine::Script`][api-class-script] API and its inherited classes, such +as [`engine::GDScript`][api-class-gdscript]. This typically defeats the purpose of scripting, but is mentioned here for completeness. ## Conclusion @@ -236,7 +236,7 @@ as [`engine::GDScript`][api-engine-gdscript]. This typically defeats the purpose In this chapter, we have seen how to define virtual functions in Rust, and how to override them in GDScript. This provides an additional integration layer between the two languages and allows to effortlessly experiment with swappable behaviors from the editor. -[api-engine-gdscript]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.GDScript.html -[api-engine-script]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Script.html -[api-scriptinstance]: https://godot-rust.github.io/docs/gdext/master/godot/engine/trait.ScriptInstance.html +[api-class-gdscript]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.GDScript.html +[api-class-script]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Script.html +[api-scriptinstance]: https://godot-rust.github.io/docs/gdext/master/godot/classes/trait.ScriptInstance.html [godot-csharp]: https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/index.html