Commit graph

54 commits

Author SHA1 Message Date
Hugo Locurcio
b087538119
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-03-16 23:01:02 +01:00
Hugo Locurcio
5ca3a360d1
Clarify identical hash() return values due to collisions
(cherry picked from commit 08541fe11d)
2022-02-15 12:27:57 +01:00
Haoyu Qiu
b1153f8829 Fix broken links in Class Reference 2021-12-10 21:07:21 +08:00
Rémi Verschelde
3ac2999f22
Replace Godot docs URL with $DOCS_URL in XML class reference 2021-11-15 17:22:47 +01:00
Rémi Verschelde
14c366ddd7
Bump version to 3.5-beta 2021-11-05 16:10:17 +01:00
zacryol
3e4e87fb90
Fix typo with example variable name in Dictionary docs, and fix error in C# example
(cherry picked from commit 9359bee75c)
2021-10-04 14:36:59 +02:00
Haoyu Qiu
44ea7e7c4f
Fix doc for Dictionary.erase
(cherry picked from commit 1e0fe9f817)
2021-10-01 08:00:59 +02:00
Rémi Verschelde
f0b37b1519
doc: Point URLs to 3.4 version of the online docs 2021-08-12 17:08:10 +02:00
Rémi Verschelde
f5836b40d4
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.

(cherry picked from commit 7adf4cc9b5)
2021-08-03 10:20:19 +02:00
Rémi Verschelde
c3272997cd
doc: Update classref headers with 3.4 version 2021-04-26 13:15:29 +02:00
Rémi Verschelde
015973df04
doc: Make all tutorial links point to 3.3 branch of docs 2021-03-26 10:43:43 +01:00
Paul Joannon
596169d7df
class reference proofreading
(cherry picked from commit 8455e901f3)
2021-03-26 09:49:07 +01:00
Rémi Verschelde
1aba997d75
doc: Sync classref with 3.3 version bump 2021-03-23 13:40:34 +01:00
Hugo Locurcio
e53a5f6be5
Improve the Dictionary class documentation
- Mention Lua-style syntax.
- Make the code samples self-contained.
- Mention caveat with `const` (also in Array).
- Clarify the description of `size()`.

This closes https://github.com/godotengine/godot-docs/issues/4272.

(cherry picked from commit 5325de4e6b)
2020-11-17 12:07:02 +01:00
Rémi Verschelde
4287af5148
doc: Make docs.godotengine.org links point to 3.2 branch 2020-10-19 16:10:01 +02:00
Aaron Franke
069ed4ec63
Link to demos from within the class reference
(cherry picked from commit 439be614f4)
2020-10-19 16:10:01 +02:00
Hugo Locurcio
5a1f94ba47 Document the in operator in String, Array and Dictionary classes
This also clarifies the `in` operator behavior in Object.

(cherry picked from commit 7f01f68226)
2020-06-15 14:34:34 +02:00
Hugo Locurcio
8e8861ed06 Mention ordering caveats for Dictionary.hash()
See https://github.com/godotengine/godot/issues/27615.

(cherry picked from commit 77b89263dd)
2020-06-10 15:30:52 +02:00
Hugo Locurcio
8ebcdeb3d7 Document that Dictionary is always passed as reference
See #38792.

(cherry picked from commit 675fea1648)
2020-05-18 16:40:33 +02:00
Marcel Admiraal
339c10889d Correct the addition of a key and the duplication of a variable name
in Dictionary class documentation.

(cherry picked from commit 4d41535fa3)
2020-04-20 11:55:31 +02:00
Hugo Locurcio
6c4a0ec75a Improve the Dictionary class documentation
This closes https://github.com/godotengine/godot-docs/issues/3376.

(cherry picked from commit 88da90f2bf)
2020-04-16 12:57:22 +02:00
Zak Grumbles
294008015e Clarify Dictionary duplicate params godotengine#37162
* Added additional clarification for the function of the 'deep'
parameter in the Dictionary's `duplicate` method.

(cherry picked from commit 469b7c948f)
2020-04-16 12:02:18 +02:00
Rémi Verschelde
df2a2ae0fc DocData: Fix serialization of Variant default values
Co-authored-by: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
(cherry picked from commit 788765709d)
2020-03-09 11:36:57 +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
Michael Alexsander
c4745c96d7 Remove unnecessary extra spaces before comments in code examples. 2020-01-23 14:41:49 -03:00
Rémi Verschelde
ba177ccaec doc: Misc updates for AnimationNode* and others
- Add some missing descriptions.
- Add links to tutorials for ARVR and AnimationTree.
- Style fixes.
- Engine changes:
  * Make `AnimationNodeTransition.input_<number>` properties internal
    so that they don't appear in the docs. They still appear in the
    inspector based on the actual number of inputs requested.
  * Drop unimplemented `CPUParticles.flatness`. It's only used for 3D
    particles in `ParticlesMaterial`, and thus only relevant for
    `CPUParticles3D`.
2020-01-23 12:37:33 +01:00
Feniks
6e24933115 Improve dictionary description
I improved dictionary description to ad some real life examples and expand on it a little bit so person who never seen dictionary can understand it better seeing them for a first time here. 
I also added note about the way to compare dictionaries  as it can catch people of guard because common assumption is that it works the same as comparing Arrays when it does not.
2020-01-20 20:36:59 +00:00
Hugo Locurcio
ecd572073c
Mention that Dictionary.hash() can be used for equality comparisons
See #27615.
2019-11-11 14:18:11 +01:00
Hugo Locurcio
f7f6115f76
Proofread and improve the whole class reference
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
  and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
2019-06-27 22:30:19 +02:00
Sean Heffernan
426bcc9941 Change "Return" to "Returns" where necessary in XML documentation
In many of the XML files it had been noted that when the documentation
refers to a return value, both "Return" and "Returns" are used. This
has now been fixed to only say "Returns".

Fixes #28867
2019-05-23 21:11:24 -07:00
lopho
5ce9bfcb4f Document dictionary erase return value 2019-05-04 21:10:18 +02:00
Rémi Verschelde
ab4705a807
Merge pull request #28125 from KoBeWi/code_true_code
Consistently wrap booleans in [code]
2019-04-22 11:59:16 +02:00
Rémi Verschelde
6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Tomasz Chabora
b0846f60c9 Consistently wrap booleans in [code] 2019-04-17 17:13:00 +02:00
Rémi Verschelde
63d3a42f82
Merge pull request #27465 from neikeq/road-to-lang-agnostic-docs-is-going-to-be-tough
EditorHelp: Improve enum ref resolving and add constant ref support
2019-04-05 15:19:21 +02:00
Rémi Verschelde
39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
Ignacio Etcheverry
d80bc5cbba ClassRef: Replace [code]CurrentClass[/code] with [CurrentClass]
Modified makerst to generate code tags for these to avoid hyperlinks to the same class.
2019-03-29 23:47:35 +01:00
Chris Bradfield
454b701e76 [DOCS] minor classref updates 2019-03-14 11:36:12 -07:00
Evgeny Savelyev
5594b08e90 added warnings about Dictionary element erasure while iterating over it 2019-02-10 23:28:22 +03:00
Rémi Verschelde
daa9092ed3 doc: Sync classref with current source 2018-11-20 09:34:45 +01:00
m
bf1867aaab Added Python-like .get() method to Dictionary in GDScript #20488
Added .get() method to Dictionary class in GDScript to return the value if the key exists, or return Null if the key does not exist.
2018-11-19 14:03:13 -05:00
Rémi Verschelde
f92b87e5f8 DocData: Fix return type listed as "var" instead of "Variant" 2018-08-31 22:41:14 +02:00
Rémi Verschelde
4ea3e4f551 doc: Sync classref with current source 2018-08-21 00:35:46 +02:00
Craigory V Coppola
0dd526e062 Docs update for several classes
Namely: Dictionary, GraphEdit, Object, TileMap, Script, ScollBar,
ScrollContainer and SplitContainer
2018-04-19 21:09:53 +02:00
Rémi Verschelde
cb7fe2c793 doc: Sync classref with current source 2018-04-10 10:12:42 +02:00
Rémi Verschelde
3fa77b3172 doc: Remove status from hardcoded version string
It has no practical use case and just generates noise for each alpha, beta, etc.
2018-02-27 13:40:49 +01:00
Rémi Verschelde
3c7a39b40c doc: Update version string in header 2018-02-19 10:46:33 +01:00
Rémi Verschelde
d516aab8fa doc: Sync with current source
Also enhance RigidBody docs as per https://github.com/godotengine/godot-docs/pull/1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
2018-01-25 08:50:56 +01:00
Rémi Verschelde
e28cdc4654 doc: Update version string in XML 2018-01-13 11:43:42 +01:00
Rémi Verschelde
abf20709af doc: Sync classref with current source 2017-12-18 08:13:58 +01:00