Commit graph

53 commits

Author SHA1 Message Date
Rémi Verschelde
ab5c75b9ad
Merge pull request #71649 from raulsntos/array-indexer
Add property usage to array indexer
2023-01-19 19:33:05 +01:00
Raul Santos
97610c8bfc
Add property usage to array indexer
This makes the `Array` indexer show as returning `Variant` instead of `void` in the documentation.
2023-01-19 14:22:11 +01:00
bruvzg
db7d8c2d87
[GDExtension] Expose some low level functions and String operators. 2023-01-19 12:50:49 +02:00
Juan Linietsky
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
rune-scape
e79be6ce07 Unify String and StringName 2022-12-05 21:46:47 -05:00
Aaron Franke
a3e52925bf
Fix default values on virtual classes causing errors in projects 2022-11-09 01:59:53 -06:00
Aaron Franke
3dc9474355
Fix default values not showing up on virtual classes 2022-11-06 15:05:36 -06:00
Lyuma
033abdc59f 2D and 3D Skeleton modification docs, and small fixes.
Mark SkeletonModificationStack3D and related as deprecated.
Mark local bone override and axis functions deprecated in Skeleton3D api.
Fix array property glitch in SkeletonModificationStack2D
Mark SkeletonModificationStack2D and related APIs as experimental. Mark SkeletonIK3D as deprecated.
2022-09-14 15:07:45 -07:00
SaracenOne
cc4bda8500 Add ability to flag classes as experimental or deprecated. 2022-09-11 00:11:33 +01:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Yuri Sizov
6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Yuri Sizov
1362bc22bd Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript 2022-08-08 16:36:01 +03:00
Hugo Locurcio
63ce655e75 Add support for documenting most editor settings in the class reference
Settings defined in editor plugins are missing (about 100 of them),
but all other settings (about 200 of them) can now be documented in the
EditorSettings class.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-29 22:07:01 +02:00
Xwdit
5d49df8d97 Fix missing method qualifiers in script doc
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-24 23:00:19 +02:00
Rémi Verschelde
635d447a69
Merge pull request #62713 from YuriSizov/docs-scripting-annotations 2022-07-06 15:31:19 +02:00
reduz
5ac42cf576 Implement a BitField hint
Allows to specify the binder that an enum must be treated as a bitfield.
2022-07-05 22:13:37 +02:00
Yuri Sizov
a9098e6147 Add support for documenting built-in annotations 2022-07-04 20:21:39 +03:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Yuri Roubinsky
32f2c47356 Remove generating of null comparison operators from documentation 2022-03-14 22:35:23 +03:00
Ricardo Subtil
61790a03f5 Fix decompression functions not returning errcodes 2022-02-18 13:50:25 +00:00
Haoyu Qiu
7d05a066e3 Translate link titles in classref XML 2022-02-17 11:11:23 +08: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
Anilforextra
fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
Rémi Verschelde
edfcdc1acb
Merge pull request #56920 from pycbouh/docs-sort-class-properties 2022-01-18 23:17:23 +01:00
Yuri Sizov
49553ecfe3 Sort class properties in the built-in docs 2022-01-19 00:07:47 +03:00
Rémi Verschelde
8898d6dadc
Dictionary: Serialize empty dict as {} instead of {\n}
Also make sure to always convert multiline dictionaries to a single line for
its EditorHelp representation, as multiline values break formatting.
2022-01-18 11:31:21 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Haoyu Qiu
e4e4e475f8 Make --doctool locale aware
* Adds `indent(str)` to `String`:
    * Indent the (multiline) string with the given indentation.
    * This method is added in order to keep the translated XML correctly
      indented.
* Moves the loading of tool/doc translation into
  `editor/editor_translation.{h,cpp}`.
    * This will be used from both `EditorSettings` and the doc tool from
      `main`.
* Makes use of doc translation when generating XML class references, and
  setup the translation locale based on `-l LOCALE` CLI parameter.

The XML class reference won't be translated if `-l LOCALE` parameter is
not given, or when it's `-l en`.
2021-12-16 17:49:22 +08:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Yuri Sizov
b3992f7e6e Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00
Yuri Sizov
397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
Rémi Verschelde
88c4380737
Modules: Make sure to include modules_enabled.gen.h where needed 2021-11-12 13:42:58 +01:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
Lightning_A
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Aaron Franke
d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
Gilles Roudière
4bd7700e89 Implement properties arrays in the Inspector. 2021-09-07 09:51:28 +02:00
reduz
96f8254b24 Implement error return documetation
Adds ability to add error return documetation to the binder and class reference.
Usage example:

```C++
void MyClass::_bind_method() {
	[..]
	BIND_METHOD_ERR_RETURN_DOC("load", ERR_FILE_CANT_OPEN, ERR_FILE_UNRECOGNIZED);
}
```

One function of ConfigFile was changed as example.
2021-08-24 15:28:29 -03:00
reduz
431ba0ebb1 Fix doctool merges when method signatures don't match
If methods signature did not match, documentation is not merged. This is
a considerable source of annoyance for contributors and it happened as
a result of #4533, otherwise the documentation for constructors would
not be properly merged.

This PR modifies the logic introduced to only do the signature test on
constructors and operators (which are the only types of members that can repeat).
2021-08-22 09:43:05 -03:00
Max Hilbrunner
5161c97c9c Remove underscore hacks
Way less cruft. :)

Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-17 16:10:28 +02:00
Yuri Sizov
bf2839ea3e Add theme item descriptions to the online documentation 2021-08-04 22:27:10 +03: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
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Rémi Verschelde
9e328bb5b7
Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
reduz
ecfa570ccb Add static method support to core Variant types
* Properly exposed, including validated and variant call
* Bound static functions in String and Color
* Did not add support for scripting languages, will have to be added manually.
2021-03-16 10:53:05 -03:00