Commit Graph

74 Commits

Author SHA1 Message Date
Rémi Verschelde fa2dcc7ace Merge pull request #47935 from HaSa1002/doc-loading-run-time 2022-07-20 22:33:49 +02:00
Yuri Sizov 316f78a037 Add default argument bindings to GDScript annotations 2022-07-11 23:02:55 +03:00
Rémi Verschelde 09e12ba9b4 Sync GDScript doc template for new annotations 2022-07-06 16:37:40 +02:00
Yuri Sizov a9098e6147 Add support for documenting built-in annotations 2022-07-04 20:21:39 +03:00
Johannes Witt 8c7d4996c9 Document how to load Images and MP3 files at run-time 2022-06-16 13:18:36 +02:00
Eduardo Rodrigues b2841ce194 Improve description for GDScript built-in range
Rewrites the definition of how the function works.
Reworks the style of the examples and adds a negative range example.
Changes the while loop to a range loop in the array backwards example.
2022-04-30 15:17:17 -03:00
Yuri Roubinsky 540fca147d Fix typo in GDScript::range doc 2022-04-20 19:38:49 +03:00
Markus Sauermann bac8e451c0 Describe usage of float in range documentation 2022-02-18 00:59:22 +01:00
Hugo Locurcio b68dd2e189 Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Yuri Roubinsky ce48604eb7 Enchance descriptions of @GlobalScope/@GDScript 2021-11-25 14:24:09 +03:00
Rémi Verschelde 6c1bd4d227 Replace Godot docs URL with $DOCS_URL in XML class reference 2021-11-15 13:02:21 +01:00
Brian Semrau d3051b2637 GDScript gracefully handle debug functions from separate thread 2021-11-01 12:13:25 -04:00
Hugo Locurcio 810d8f06b7 Add an example on iterating an array backwards
This closes https://github.com/godotengine/godot-docs/issues/3472.
2021-09-30 20:29:57 +02:00
Rémi Verschelde 7adf4cc9b5 doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Hugo Locurcio 8ff8c1e5f8 Improve documentation for GDScript constants 2021-07-22 09:50:24 +02:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Heikki Simojoki 09a905ca80 Increase String::num default decimal precision
Fixes #34541

Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the
amount of digits after the decimal point.

Increased MAX_DECIMALS to 32, and made String::num use
MAX_DECIMALS consistently. If -1 is passed as
decimal precision to String::num, it now gets changed to
the correct precision based on the number's magnitude,
instead of using printf default(which is 6)

String::num_real also calculates the correct precision now.

Also made the types used in floating-point math more
consistent in a few places.
2021-05-29 11:24:57 -04:00
Rémi Verschelde 215d18814e doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
Marcel Admiraal b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00
skyace65 4fd20015f3 Pow method doc fix 2020-12-13 17:53:30 -05:00
Danil Alexeev bf96056ad0 Several edits to the GDScript docs 2020-12-01 16:05:10 +03:00
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