Commit Graph

43 Commits

Author SHA1 Message Date
31 0a9715d6b5 Add Callable call_deferred() C# example 2024-02-03 20:49:05 -08:00
Danil Alexeev b04263644c
Core: Allow methods of built-in `Variant` types to be used as Callables 2023-10-25 15:53:52 +03:00
Septian 793cc080cb Fix `get_method` from named lambda 2023-08-11 20:31:08 +07:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde 346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
Gilles Roudière 538c4b62b7 Explain a bit more RPCs options 2023-06-27 11:25:15 +02:00
Rémi Verschelde d40c45ed99
Merge pull request #77688 from L4Vo5/clarify-deferred
Clear up misconceptions about when deferred things run in the docs
2023-06-22 10:29:56 +02:00
L4Vo5 2747dd35e7 clarify the meaning of "deferred" 2023-06-18 00:46:58 -03:00
Adam Scott 810806e6b5
Add note in `Callable` documentation about methods of native types
- Adds a workaround/code example too.
- Fixes #58912 (the issue itself is not a bug, but the solution was to add a documentation entry about the "issue")
2023-06-15 10:45:46 -04:00
VolTer 04562662d3 Overhaul the top sections of the class reference (Core classes) 2023-05-19 07:04:48 +02:00
Ninni Pipping 0332fd5e8f Improve description of `Callable.bind/unbind` 2023-04-17 14:04:11 +02:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
GeroVeni 54f2226ce5 Improve docs for rpc annotations 2023-02-04 13:28:41 +00:00
Raul Santos 92e4b4e888
Update C# signal documentation and remove bind array
- Updates C# signal documentation and code examples to the new API in 4.0
- Replace all `nameof` usages with the exposed `StringName`
2023-01-23 16:45:37 +01:00
Doug Thompson a4c734ed32 Class reference: snake_case .gd filenames, _on_*
This is for:
https://github.com/godotengine/godot-docs/issues/6245
2023-01-15 13:26:29 +00:00
Juan Linietsky 33d3b7eea7 Fix Callable call error reporting.
* Fix potential crash when using bind in `Variant::get_callable_error_text()`
* Properly compute bound arguments so they can be properly shown.
* Add a function to obtain the actual bound arguments.
2023-01-10 13:56:27 +01:00
Rémi Verschelde 31f94574d4
Merge pull request #70996 from reduz/properly-report-callable-bound-arguments
Properly report Callable bound arguments
2023-01-09 08:34:28 +01:00
Juan Linietsky 0e0ca01bce Properly report Callable bound arguments
Fixes #63213
Adds a function: Callable::get_amount_of_arguments_bound() to query this in callables. Exposed to the engine API.
2023-01-08 23:35:11 +01:00
Juan Linietsky d762a0395a Allow binding Callable arguments from an array
Restores 3.x functionality that was removed in the Signal/Callable refactor of 4.0.

Fixes #64668.
Implements https://github.com/godotengine/godot-proposals/issues/6034

Usage:

```GDScript

callable.bindv([arg1,arg2,arg3])

```
2023-01-06 22:37:25 +01:00
Micky 311b29c627 Tweak Callable's documentation
- Clarify that Callable is a Variant type, not an Object.
- Add lambda function example
- Update outdated description of `is_custom` and `is_valid`-
2022-11-23 18:39:52 +01:00
Ricardo Buring 0c2055d15d Callable: add callv method
This method can be called from GDExtension.
2022-09-21 08:25:48 +02:00
kobewi 188d5593e1 Mention that grab_focus is more reliable deferred 2022-08-30 14:20:43 +02:00
Andy Maloney d32803fdd6 [doc] Use "param" instead of "code" to refer to parameters (7) 2022-08-12 13:19:48 -04:00
Yuri Sizov c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03: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
Hugo Locurcio 08541fe11d
Clarify identical `hash()` return values due to collisions 2022-02-12 22:21:37 +01:00
Aaron Franke 6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05: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
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
Lyuma 8f1efa656b Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.x 2021-07-01 02:54:01 -07:00
reduz c76acf6890 Add RPC to Callable
-Up to each scripting language to implement this
-If not supported for the function, it will just error when you try to call
2021-05-03 19:21:37 -03: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
kleonc 39a4ec50ea Fix examples in Callable docs 2021-03-02 02:34:53 +01:00
HaSa1002 54ff2da476
Document missing Callable methods
* Callable.hash()
 * Callable.is_custom()
 * Callable.is_null()
 * Callable.is_standard()
 * Callable.bind()
 * Callable.unbind()
 * Callable::operator==
 * Callable::operator!=

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-03-01 12:49:21 +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
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 d22791c271
doc: Sync classref with current source 2020-10-12 10:58:02 +02:00
HaSa1002 ae873ab822 Translate GDScript Code Examples to C# (C)
Translates Code Examples in classes beginning with `C`.

Includes:
 * Callable
 * CanvasItem
 * CharFXTransform
 * Color
 * ColorRect
 * ConfigFile
 * ConfirmationDialog
 * Control
 * Crypto
2020-09-26 11:48:37 +02:00
Tomasz Chabora e103f21a40 Add LOTS of missing docs 2020-03-13 16:35:03 +01:00
Rémi Verschelde fea37cfb52 doc: Sync classref with StringName/Callable changes 2020-02-22 14:59:09 +01:00