Commit graph

72 commits

Author SHA1 Message Date
Rémi Verschelde
68067b8d97
Merge pull request #43423 from Calinou/doc-assert-avoid-side-effects
Clarify that code in `assert()` should avoid side effects
2020-11-10 11:31:28 +01:00
Rémi Verschelde
0f249f5c0a
Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
Hugo Locurcio
d6c7073bd7
Clarify that code in assert() should avoid side effects 2020-11-09 21:48:24 +01:00
Yuri Roubinsky
38fb26794b Exposed randi_range to global funcs + renamed rand_range to randf_range 2020-11-06 17:06:26 +03:00
Hugo Locurcio
802c1e4df1
Link the Random number generation tutorial in the class reference 2020-10-14 18:03:29 +02:00
Rémi Verschelde
3556bc48a1
Merge pull request #42439 from Xrayez/doc-gdscript-load-and-resloader-xref
Cross-reference GDScript `load` and `ResourceLoader.load` in classref
2020-10-04 20:48:07 +02:00
Serhat
9f2cdfea82 Fixed padding bug of sprintf function 2020-10-02 00:25:42 +03:00
Andrii Doroshenko (Xrayez)
a8404cf56c Cross-reference GDScript load and ResourceLoader.load in classref
The GDScript `load` mention is moved from the class `ResourceLoader`
description to the `ResourceLoader.load` method description instead,
where it is more likely to be found.
2020-09-30 23:03:36 +03:00
Hugo Locurcio
50f3a8e312
Improve documentation related to printing error/warning messages 2020-09-24 14:23:53 +02:00
Danil Alexeev
a4c5790350 Several documentation improvements 2020-09-14 20:02:19 +03:00
Hugo Locurcio
c4903a603b
Add link titles for all links in the class reference
This makes them display in a nicer way in the editor help.
(The title will display instead of the full URL.)
2020-08-31 14:22:07 +02:00
Hugo Locurcio
20d0f5bbd7
Cross-reference GDScript built-in rounding methods to ease discovery
This closes #19315.
2020-08-28 17:04:22 +02:00
Rémi Verschelde
ba853f86af
Merge pull request #40903 from Calinou/doc-json
Improve JSON-related documentation
2020-07-31 10:39:56 +02:00
Hugo Locurcio
930e10ffff Improve JSON-related documentation
This closes https://github.com/godotengine/godot-docs/issues/3848.
2020-07-31 09:56:11 +02:00
Rémi Verschelde
9833f9cc11 doc: Fix typo in BBcode tag 2020-07-30 16:24:37 +02:00
Rémi Verschelde
932b75e247 doc: Sync classref with current source 2020-07-28 01:08:44 +02:00
Meriipu
7f9bfee0ac GDScript: Clarified/fixed inaccuracies in the built-in function docs.
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.

Clarified what it means to be approximately equal.

nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.

Added a few examples/clarifications/edge-cases.
2020-07-25 20:26:02 +02:00
Aaron Franke
83e324d670
Update core documentation to match recent C# changes
Also a few minor API changes like adding AABB.abs()

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-07-21 14:44:53 -04:00
Tomasz Chabora
13298ed873 Improve the preload and load descriptions 2020-06-28 20:51:46 +02:00
Aaron Franke
540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
Rémi Verschelde
0ef8bcac4d DocData: Skip unexposed classes
Properly expose classes that we actually want accessible.
2020-04-20 12:51:10 +02:00
Thomas ten Cate
4c3c73ef9c Add missing docs for assert message in GDScript
Seems like this was overlooked in PR #31142. See also issue #17082.
2020-03-31 19:56:44 +02:00
Rémi Verschelde
eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00
Rémi Verschelde
807b511125
Merge pull request #36620 from Calinou/doc-linear2db-example
Add a practical example for `@GDScript.linear2db()`
2020-02-28 07:03:35 +01:00
Hugo Locurcio
a6fd6b78dd
Add a practical example for @GDScript.linear2db()
One of its most common applications in games is for volume sliders.

See https://www.dr-lex.be/info-stuff/volumecontrols.html for
more information.
2020-02-27 22:52:21 +01:00
Hugo Locurcio
6b5573700b
Improve the @GDScript.inverse_lerp() documentation
This closes https://github.com/godotengine/godot-docs/issues/2589.
2020-02-27 22:49:05 +01:00
Rémi Verschelde
213a85521d doc: Sync classref with current source
Handle removal of Pool*Array types and other recent changes.
2020-02-18 14:02:02 +01:00
Rémi Verschelde
bd78b9f445 Remove deprecated decimals builtin
Replaced by 'step_decimals' in 3.2 via #21425.
2020-02-12 13:39:39 +01:00
clayjohn
57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08:00
Rémi Verschelde
4cee1cda5e
Merge pull request #35589 from akien-mga/doc-drop-category-property
doc: Drop unused 'category' property from header
2020-01-26 16:34:13 +01:00
Rémi Verschelde
09ced94dd4 doc: Do not expose Variant::NIL as a type in the class reference
Fix signals Variant arguments incorrectly listed as Nil.

Fixes #12520.
2020-01-26 16:08:11 +01:00
Rémi Verschelde
2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
Rémi Verschelde
cbdbfb00ca doc: Document named color constants
Busywork but it's good for our completion rate :)
2020-01-26 12:08:16 +01:00
Rémi Verschelde
74977277fa
Merge pull request #34280 from zaksnet/fix-yield-documentation
Fix documentation for yield
2019-12-16 08:49:32 +01:00
Haoyu Qiu
468fcd80bb Updates docs for GDScript built-in functions
* Adds description for `ord()`
* Adds relationship description between `char()` and `ord()`
* Describes the argument of `char()` as Unicode code point instead of ASCII code
* Fixes wrong interval notation in `randi()` description
2019-12-15 19:06:29 +08:00
Zak
0fd7186971 Fix documentation for yield
#33872 PR was misleading as i though inheritance from GDScriptFunctionState was optional.
2019-12-13 11:17:12 +02:00
Michael Alexsander
6cc3bb2d9b Add note in 'load()' docs that the path must be absolute 2019-12-11 17:14:58 -03:00
Rémi Verschelde
4eff13d768 doc: Markup fixes for enums and constants 2019-12-06 23:09:20 +01:00
Hugo Locurcio
1fcdeaee39
Mention that int() can be used as an alternative to floor() 2019-12-03 08:43:24 +01:00
Aaron Franke
3231fca934
Add docs for is_equal_approx on structures 2019-11-30 16:52:27 -05:00
miere43
d747c61187 Fixed typo in docs for Script and GDScript classes ("exends" -> "extends") 2019-11-30 21:16:11 +03:00
Hugo Locurcio
4f14a1f59c
Remove type hint from the @GDScript class documentation
The current consensus in the Godot documentation is to avoid using
type hints unless they're relevant to the behavior explained.
2019-11-26 19:13:55 +01:00
Zak Stam
5cfff77ca6 Added missing documentation for yield()
Added some missing documentation about yield() being able to wait for a function also. I cant believe something like that was missing from the docs, it would have saved me so much time (and others i assume).
2019-11-25 18:08:18 +02:00
Rémi Verschelde
91518defa5
Merge pull request #33257 from aaronfranke/printraw
Document behavior of GDScript printraw
2019-11-07 13:21:09 +01:00
Aaron Franke
c4e46b8800
Document behavior of printraw 2019-11-02 04:55:39 -04:00
Aaron Franke
b67f252016
Fix Color8 GDScript documentation 2019-11-02 04:48:08 -04:00
Yeongho Kim
d4a55fb639 Print errors when tab indent found in [codeblock] 2019-10-01 23:39:45 +09:00
Rémi Verschelde
4f294b958f doc: Sync classref with current source
Fix a few missing bindings or unspecified argument names and default values.
2019-09-24 11:52:06 +02:00
Rémi Verschelde
65d61d0360 doc: Sync classref with current source 2019-08-29 15:33:52 +02:00
Thomas Karcher
02ed79f7f7
Updated description for "stepify"
Mentioned the possibility to use stepify as a rounding function; +code examples
2019-08-29 14:03:18 +02:00