Commit graph

125 commits

Author SHA1 Message Date
reduz
3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Paulb23
b73983340d Add bulk theme overrides to Control 2021-08-13 16:41:36 +01: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
Michael Alexsander
94a64d557e Add auto_translate toggle for automatic translation 2021-07-29 18:30:34 -03:00
Hugo Locurcio
37c1cbdcb2
Document caveats with Control's mouse_entered/mouse_exited signals 2021-07-25 22:43:02 +02:00
Nicholas Huelin
9a72b0d3d0 Fix doc typos
This pull request fixes an assortment of typos and improves conciseness in `Animation`, `Area2D`,  `Array`, `ArrayMesh`, `Control`, `Directory`, `EditorPlugin`, `Engine`, and `OS`.
2021-07-23 12:15:15 -04:00
Yuri Sizov
21b994ac99 Improve Control's theme item methods documentation 2021-07-14 01:26:02 +03:00
Yuri Sizov
4ee0e6ddf5 Add type variations to Theme 2021-07-13 02:26:28 +03:00
reduz
75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
reduz
b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
kobewi
452e10ba7b Remove clips_input() method and use clip_content 2021-06-25 15:46:37 +02:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Michael Alexsander Silva Dias
0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
kobewi
7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
Jonathan Gollnick
6710ad1737
Let var2str display StringName with correct sigil 2021-06-10 16:30:28 -05:00
Rémi Verschelde
c1c76850cb
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.
2021-06-07 11:03:08 +02:00
Yuri Sizov
9eaa139c1f Add theme_custom_type property to Control and Window 2021-05-17 17:20:42 +03:00
Rémi Verschelde
5d0cc7c15f Merge pull request #47252 from KoBeWi/themecide
Add methods to remove theme overrides
2021-03-31 20:52:19 +02:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
kobewi
5950482b86 Remove the clearing behavior from add_override 2021-03-23 00:55:02 +01:00
kobewi
ecff5bc42f Add methods to remove theme overrides 2021-03-23 00:51:16 +01:00
Delf Neumärker
eaa04c1a22
Fix crash during drag if user freed the drag preview 2021-02-24 20:59:17 +01:00
Rémi Verschelde
13c0e48791
Merge pull request #45137 from Calinou/doc-control-gallery
Reference the control gallery image in the Control class documentation
2021-02-01 20:49:30 +01:00
Hugo Locurcio
200f1cf015
Reference the control gallery image in the Control class documentation
Like the Tween cheatsheet or Color constants cheatsheet, this references
a "cheatsheet" image from the documentation repository.
2021-01-29 18:05:04 +01:00
Nils Reid
3e94c23fa5 Exposed find_next_valid_focus and find_prev_valid_focus. 2021-01-26 08:19:20 +01:00
Rémi Verschelde
215d18814e
doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
Rémi Verschelde
9addcb7603
Merge pull request #44751 from madmiraal/rename-rect-grow_margin
Rename Rect2 and Rect2i grow_margin() to grow_side()
2020-12-28 15:56:14 +01:00
Rémi Verschelde
891b1cdf28
Merge pull request #44607 from madmiraal/rename-control-rotation
Rename Control rotation to rotation_degrees
2020-12-28 14:42:06 +01:00
Marcel Admiraal
b628912af0 Rename Rect2 and Rect2i grow_margin() to grow_side() 2020-12-28 12:47:33 +00:00
Marcel Admiraal
b832003c6b Rename Control rotation to rotation_degrees 2020-12-23 07:06:30 +00:00
Marcel Admiraal
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Daniel Ting
aea7fde241 Rename neighbour in Control to neighbor
This keeps things consistent with the rest of Godot, which uses the
American English spelling of Color.
2020-12-15 16:42:21 -06:00
bruvzg
7e2c0ffd1a
[Complex Text Layouts] Add TextServer documentation. Update Font, CanvasItem, Theme and modified controls documentation. 2020-11-26 14:25:52 +02:00
Rémi Verschelde
fc70f986b9
Merge pull request #42008 from Calinou/theme-rename-node-type
Rename the `type` parameter to `node_type` in Theme and Control
2020-11-16 13:20:24 +01:00
Rémi Verschelde
c5d8dafec4
Tooltips: Improve code clarity and docs
The return type for `_make_custom_tooltip` is clarified as Control, and users
should make sure to return a visible node for proper size calculations.

Moreover in the current master branch, a PopupPanel will be added as parent
to the provided tooltip to make it a sub-window.

Clarifies documentation for `Control._make_custom_tooltip`, and shows how to
use the (until now undocumented) "TooltipPanel" and "TooltipLabel" theme types
to style tooltips.

Fixes #39677.
2020-11-03 09:19:03 +01:00
Hugo Locurcio
c3b246e6af
Rename the type parameter to node_type in Theme and Control
This makes it clearer that it expects a node type as a string
(such as "Label") instead of a type like "TYPE_ARRAY".
This is backwards-compatible since only the name of the parameter
is changed, not its order.
2020-10-27 14:58:52 +01:00
Duroxxigar
4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
Aaron Franke
439be614f4
Link to demos from within the class reference 2020-10-01 23:57:21 -04: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
Hugo Locurcio
c4903a603b
Add link titles for all links in the class reference
This makes them display in a nicer way in the editor help.
(The title will display instead of the full URL.)
2020-08-31 14:22:07 +02:00
Hugo Locurcio
2a8bbda2a7
Improve the documentation related to overriding GUI theme items
Overriding theme items is a common point of confusion.
Hopefully, these code samples should clear things up.
2020-08-04 12:57:53 +02:00
Hugo Locurcio
a36912b3cb Document caveats related to Control scaling
This is a common topic of confusion. Clarifying its intended scope
should make things easier to understand.
2020-07-15 10:36:29 +02:00
Yuri Sizov
1ea7295bd2 Improve shortcut formatting in docs 2020-04-10 18:42:11 +03:00
Markus Sauermann
3f19b5e0b3 Clarify documentation and indicate that rect_clip_content affects only CanvasItem based nodes.
Resolves #37683
2020-04-09 22:09:05 +02:00
Rémi Verschelde
e5033d3952 doc: Sync classref with DisplayServer/Window changes 2020-03-31 11:56:58 +02:00
Rémi Verschelde
fea37cfb52 doc: Sync classref with StringName/Callable changes 2020-02-22 14:59:09 +01:00
Rémi Verschelde
0e3d625737 doc: Sync classref with current source
Lots of internal API changes and some docstrings were lost in the conversion.
I manually salvaged many of them but for all the rendering-related ones, an
additional pass is needed.

Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-12 12:37:13 +01:00
clayjohn
57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08: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
Chris Bradfield
378c4895ae [DOCS] Corrections and clarifications to classref 2020-01-10 10:46:41 -08:00