Commit Graph
237 Commits
Author SHA1 Message Date
Kleidon ea02eb44b5 Fix "or_greater"/"or_less" code example
The code example demonstrating the usage of the "or_greater" and "or_less" hints for the export_range annotation does not declare a variable after the annotation, which is inconsistent with the previous three code examples in the section.
Also, giving the export_range a step of 1 does not create a slider for the property in the editor, like the text suggests, but it instead creates a spin box. The step should be changed to a float so the property can appear as a slider.
2024-11-30 07:12:08 +01:00
Andrey Solomatin 10ca7b1d8d Made edits to match GDScript code order
Updated gdscript_documentation_comments.rst
2024-11-30 07:06:20 +01:00
tetrapod00 88601c21e3 Improve GDScript Basics sidebar navigation by changing header levels
Promotes many headers up one level, so they appear in the sidebar.
Removes the redundant Language header, since the whole page is about the language.
2024-11-30 07:03:52 +01:00
tetrapod00 14cd3078a3 Remove references to 3.x minor versions
Removes notes about features being introduced in 3.x minor versions. In 4.x, these
details are no longer relevant.
2024-11-30 07:01:03 +01:00
tetrapod00 0b495a66b0 Fix docstring written as comment 2024-11-30 07:00:28 +01:00
Hugo Locurcio b5e097d435 Document Variant not being nullable 2024-11-30 06:57:24 +01:00
Hugo Locurcio c86adb0bda Clarify restrictions on nested array types in Static typing in GDScript 2024-11-30 06:57:06 +01:00
Aaron Franke a04b7d9780 Add a note about GDScript format strings in C++ (#10061) 2024-11-30 06:56:03 +01:00
A Thousand Ships d57d5f894e [GDScript] Clarify initialization of enum values
# Conflicts:
#	tutorials/scripting/gdscript/gdscript_basics.rst
2024-11-30 06:51:33 +01:00
notPelfandtetrapod 8835289fe7 Add info about layer mask exporting to physics_introduction.rst (#10242)
* Update physics_introduction.rst

The docs page for raycasting provides a link to the physics introduction page for how to set a collision mask on a raycast created in code. The physics introduction page does not mention export annotations for exporting a collision mask. This pull request adds a brief bit about exporting layer masks, and links to the export annotation docs.

---------

Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
2024-11-17 11:22:00 +01:00
Hugo Locurcio 8a263cb63f Fix Code order section saying it's the first section in GDScript style guide
It's not the first section of the page anymore.
2024-10-04 03:56:01 +02:00
Junwan Park 0a5fc87ffb Fix builtin_types link in tutorial gdscript_basics page
It's linked to a wrong position.
2024-10-04 03:54:19 +02:00
tetrapod00 bd0da40feb Add documentation for GDScript when statement 2024-10-04 03:53:42 +02:00
Hugo Locurcio 5f13e67349 Document PackedVector4Array
This type was added in Godot 4.3.
2024-10-04 03:51:42 +02:00
DDoopandMax Hilbrunner e9035f7cf0 Add warnings for classes named "Editor" in GDscript and C# pages, class_name keyword/global class attribute (#9548)
* Added warning about Editor hiding class_names beginning with Editor prefix

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
2024-08-14 19:42:36 +02:00
Jace Bennest d71c24c699 Update gdscript_styleguide.rst
fixes typo
2024-08-04 10:48:19 -07:00
Muller-Castro a36ff907f9 Add typed loop variable example in GDScript reference (#9388) 2024-08-02 02:30:20 +02:00
Danil Alexeev 67be15e905 GDScript: Update lambda documentation 2024-06-29 14:51:46 +03:00
3e2a8f6f7c Update outdated annotation and setget syntax
Co-Authored-By: PoolloverNathan <24194027+PoolloverNathan@users.noreply.github.com>
Co-Authored-By: Solor Vox <1246172+solorvox@users.noreply.github.com>
2024-06-27 22:13:37 +02:00
Hakunamawatta eb14a4adae Typo in gdscript_basics.rst 2024-06-19 22:32:32 +10:00
A Thousand Ships 36e2351df2 Fix invalid indentation in various files 2024-06-06 16:16:45 +02:00
Matthew 194685b65d Merge pull request #9407 from ceejbro/patch-1
Remove Note from Constants
2024-06-04 21:20:34 -04:00
Hugo Locurcio 71cdbdd055 Tweak guidelines on dictionary and enum formatting in GDScript style guide
- Recommend writing each enum item on its own line, similar to C++.
- Recommend using spaces around inline dictionary declarations
  to make them easier to distinguish from arrays (due to similar-looking
  `[]` and `{}` characters in most fonts). This is commonly found
  in Python or JavaScript style guides.
2024-05-29 17:52:29 +02:00
CJ Brown 7b91dffc22 Remove Note from Constants
PR #71051
Documentation not updated to reflect deep read-only change to const Array and const Dictionary
2024-05-21 14:37:23 -04:00
Max Hilbrunner 4e216fc5fc Merge pull request #9313 from dalexeev/update-doc-markup-docs
Update class reference and doc comment markup documentation
2024-05-07 11:27:26 +02:00
Yuri Rubinsky 3e05334189 Add a super keyword to the table of keywords 2024-05-02 18:35:10 +03:00
Danil Alexeev c89b0e6ab3 Update class reference and doc comment markup documentation 2024-05-02 13:14:02 +03:00
Max Hilbrunner 160034a4ac Merge pull request #9188 from allenwp/annotation-improvements
Improve description of annotations
2024-04-30 04:19:10 +02:00
Allen Pestaluky 8dd09aa962 Improved description of annotations
Removes an unnecessary and potentially confusing comparison of annotations to keywords and generally improves wording in the GDScript Basics tutorial. A new page to the Contributing section has been added for scripting development guidelines. This new page hosts suggestions on when annotations should be implemented in GDScript.
2024-04-29 13:18:30 -04:00
NormPlum 94b33fc106 Update gdscript_basics.rst
Fix grammar re. 'await/awaiting'.
2024-04-27 03:13:09 +00:00
JP 4ae3064699 Fixed out of date binding syntax for Signal.connect
fixes godotengine/godot-docs#9236
2024-04-23 13:33:09 +02:00
Danil Alexeev 60befd7527 GDScript: Clarify raw string literals documentation 2024-04-09 16:25:03 +03:00
lena 2925c83390 docs: Clarify associativity of operators. (#9170)
* docs: Clarify associativity of operators.
2024-04-06 19:28:25 +02:00
bd7bc61e9e Document new feature allowing @exported Arrays to set property hints for their elements (#9061)
* Document export variations for arrays

* Update tutorials/scripting/gdscript/gdscript_exports.rst

Co-authored-by: Raul Santos <raulsntos@gmail.com>

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2024-03-25 17:34:38 +01:00
444BandA Thousand Ships 3d441150b1 Update gdscript_styleguide.rst - clarified sentence and grammar (#9110)
* Update gdscript_styleguide.rst - clarified sentence and grammar

- Clarified the statement on "One statement per line"
- Removed unclear sentence with incorrect grammar

---------

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-03-21 11:49:25 +01:00
Danil Alexeev 88ec4c294b GDScript: Document @export_storage annotation 2024-03-01 22:28:32 +03:00
Danil Alexeev 200c91b679 GDScript: Update deprecated/experimental docs 2024-02-16 12:00:18 +03:00
Danil Alexeev 46e69f0d1e GDScript: Document is not operator 2024-02-07 13:25:33 +03:00
Matthew 6a6f786c7a Merge pull request #8870 from scotmcp/patch-2
Correcting link to class Reference
2024-02-01 21:46:12 -05:00
scotmcpandA Thousand Ships 0fc05ae44e Update tutorials/scripting/gdscript/gdscript_basics.rst
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-01-31 15:31:11 -05:00
scotmcp 83bd5dddc3 Fixed Type description from resource to GDScript 2024-01-31 18:59:27 +01:00
scotmcp 330f58f208 Correcting reference link
line 2016 references Class, should reference Resource
2024-01-31 18:59:27 +01:00
Max Hilbrunner 8a22a6d5a0 Merge pull request #7507 from dalexeev/gds-var-init-order
GDScript: Document variable initialization order
2024-01-24 19:58:35 +01:00
Peter Anderson ab98451bc8 Re-word 'Comment spacing' note in gdscript_styleguide.rst 2024-01-22 05:14:52 +00:00
Danil Alexeev c3322d8d27 GDScript: Document variable initialization order 2024-01-14 19:35:25 +03:00
Max Hilbrunner 01a7b2ff94 Merge pull request #7520 from Calinou/add-page-comments
Add support for user-provided comments with Giscus
2024-01-13 22:32:30 +01:00
Hugo Locurcio 95fb178429 Add support for user-provided comments with Giscus
This allows users to leave comments on pages that don't have
`:allow_comments: False` somewhere in the page's source.
Both manual and class reference pages can receive comments.
Index pages cannot have comments, as discussion should occur on "leaf" pages.

GitHub Discussions is used as a backend on the same repository. This means
that Discussions *must* be enabled on godotengine/godot-docs before this
commit is merged to `master`. Users can choose to use the "Custom" watch
mode if they don't want to get notifications for discussion updates,
but still get notifications for issue and pull request updates.

User comments are intended to be used for the following purposes:

- Add a clarification or correct something in the documentation,
  without having to open a pull request. Contributors are encouraged to
  take a look at discussions from time to time, and see if there's information
  worth incorporating in the pages themselves. Don't forget to reply to
  the comment when doing so :)
- Mention a workaround for a common issue.
- Link to useful third-party resources that are relevant to the current page,
  such as tutorials or add-ons.

User comments should *not* be used for technical support. Other community
platforms should be used for that.

Page-to-discussion matching is done using the `pagename` Sphinx variable,
which is independent of the Godot version and documentation language.
Being independent of the Godot version allows keeping old comments
when the Godot version changes, while also allowing users from `/stable`
and `/4.1` to "see" each other in discussions.

See https://giscus.app for more information.
2024-01-11 17:51:53 +01:00
Hugo Locurcio e93fc9b1f2 Document importing SVG images with text
- Mention editor plugins and custom node icons should use the appropriate
  import options.
2024-01-11 00:18:50 +01:00
Max Hilbrunner ed8a175d80 Merge pull request #8654 from AdriaandeJongh/patch-3
Added section on common unsafe operations and their safe counterparts
2024-01-08 07:57:29 +01:00
Mathias L. BaumannandDanil Alexeev d3ee49e2b7 Update tutorials/scripting/gdscript/gdscript_basics.rst
Lambdas need an explicit `return`

Extend the documentation so that it is clear that lambdas require an explicit return .

Also add an according example.

Co-Authored-By: Danil Alexeev <danil@alexeev.xyz>
2024-01-07 13:59:19 +01:00