Commit Graph

44 Commits

Author SHA1 Message Date
kobewi
9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
kobewi
b099a8570c Complete documentation of packed arrays 2022-08-19 00:43:29 +02:00
Andy Maloney
1df86ecea5 [doc] Use "param" instead of "code" to refer to parameters (4) 2022-08-11 13:52:19 -04:00
Haoyu Qiu
9c4ad8191b Expose clear method for packed arrays 2022-08-10 17:12:20 +08:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Lyuma
33fd7c63e1 Prevent out-of-bounds write in array conversion; avoid logspam on empty arrays. 2022-06-30 18:04:33 -07:00
Haoyu Qiu
380a53f02f Add search methods for packed arrays
* count()
* find()
* rfind()
2022-05-07 20:16:11 +08:00
Haoyu Qiu
24febff2dc Remove Array link in description of PackedArrays 2022-04-23 11:06:02 +08:00
Yuri Roubinsky
32f2c47356 Remove generating of null comparison operators from documentation 2022-03-14 22:35:23 +03: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
Rémi Verschelde
c6cefb1b79
Array: Relax slice bound checks to properly handle negative indices
The same is done for `Vector` (and thus `Packed*Array`).

`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.

`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.

This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-10 22:42:03 +01:00
Haoyu Qiu
3d08becd06 Unify similar method descriptions
Notably:

* `Packed*Array.size()` and `Array.size()`.
* Shared methods of `Transform2D` and `Transform3D`.
* Shared methods of `Vector2`, `Vector3`, and `Vector2i`.

This reduces the Deja Vu when translating the class reference :)
2022-01-06 19:50:57 +08:00
Nathan Franke
dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice 2021-11-26 22:13:12 -06:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
Rémi Verschelde
b32f84d473
Merge pull request #52850 from mashumafi/vector-bsearch 2021-10-01 07:52:51 +02:00
mashumafi
214bbfbefe Implement bsearch for Vector and Packed*Array 2021-09-30 23:57:26 +00:00
Aaron Franke
d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
George Marques
455e142d37
Allow comparing equality between builtin types and null 2021-09-17 12:33:52 -03:00
Ellen Poe
f5d9c7b487 Replace stb_vorbis with libogg+libvorbis 2021-09-09 19:39:04 -07: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
ChristopheClaustre
20818c12b7 New to_***_array method to decode PackedByteArray to Packed***Array
Documentation for new PackedByteArray::to_***_array methods
Documentation for to_byte_array method for PackedInt32/Int64/Float32/Float64Array
2021-07-24 21:06:47 +02:00
Matheus Lima Cunha
efd27a63c1 Add fill method to Arrays and PackedArrays 2021-04-21 11:33:53 -03:00
Rémi Verschelde
29775a1714
doc: Sync classref with current source 2021-04-19 12:26:37 +02:00
Yuri Sizov
c526a1e22d Fix misformatted documentation from #47435, #42827, #46991 2021-04-04 23:25:40 +03:00
Marcel Admiraal
755c70b871 Rename Array.invert() to Array.reverse()
Does the same internally for List and Vector<>, which includes all
PackedArray types.
2021-03-21 10:20:08 +00:00
Paul Joannon
8455e901f3
class reference proofreading 2021-03-19 13:21:20 +01:00
Rémi Verschelde
4ca1e73ff9
doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
Rémi Verschelde
215d18814e
doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
Marcel Admiraal
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Jordan Schidlowsky
2d56e09276 packed*arrays are pass by ref now. support duplicate and update documentation 2020-12-17 16:09:32 -06:00
Rémi Verschelde
91dd6da2ff
Merge pull request #43246 from HaSa1002/docs-lang-5
Docs: Port code examples to C# (M, N, O, P, Q, R)
2020-11-16 09:16:18 +01:00
Rémi Verschelde
64e893deac
doc: Sync classref to add operators after #43419 2020-11-10 15:00:50 +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
HaSa1002
a3df26e554 Docs: Port Code Examples to C# (M, N, O, P, R)
Includes:
 * MarginContainer
 * NavigationPolygon
 * Node
 * NodePath
 * OS
 * PackedByteArray
 * PackedScene
 * PacketPeerUDP
 * PCKPacker
 * Performance
 * PhysicsShapeQueryParameters2D
 * PhysicsShapeQueryParameters3D
 * PrimitiveMesh
 * ProjectSettings

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-11-09 10:05:53 +01:00
Rémi Verschelde
424cd00f8b
doc: Sync classref with current source + fixup some bindings
Includes various changes triggered by the refactoring of method bindings.
2020-11-04 15:38:26 +01:00
Rémi Verschelde
3e78963bb9
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 13:44:25 +02:00
Rémi Verschelde
a2a78a8066
doc: Sync classref with current source
Bind missing enums.
2020-09-11 12:22:10 +02:00
Fabio Alessandrelli
2cb6b2ac6f
Merge pull request #38944 from Wavesonics/http-gzip
HttpRequest now handles gzipping response bodies
2020-09-07 17:03:19 +02:00
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Adam Brown
6584db1538 HTTPRequest now accepts gzip
Added request_raw to HttpRequest
Added decompress_dynamic to Compression class
Added decompress_dynamic to BytePoolArray

Merge doc fix

revert
2020-09-02 12:59:59 -07:00
Aaron Franke
af80bcd2f8
Add sort and has methods to PackedArrays 2020-07-06 22:16:39 -04:00
Rémi Verschelde
048f4f8305 doc: Sync classref with apparent Variant return type changes
Part of those seem bogus, methods like Array.back()/front()
should return a Variant and not void.
2020-02-22 15:16:32 +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