Commit Graph

581 Commits

Author SHA1 Message Date
Marcel Admiraal
22bc5277e7 Rename AcceptDialog get_ok() to get_ok_button()
Also renames:
- AcceptDialog add_cancel() to add_cancel_button()
- ConfirmationDiaglog get_cancel() to get_cancel_button()
2020-12-14 18:43:52 +00:00
Rémi Verschelde
46046f9a54 Merge pull request #44132 from aaronfranke/no-connect-compat
Remove connect *_compat methods
2020-12-06 00:55:28 +01:00
Aaron Franke
3706ea319f Remove connect *_compat methods 2020-12-05 17:56:47 -05:00
Thakee Nathees
fb8485a03e Refactor DocData into core and editor (DocTools) parts 2020-12-02 00:48:39 +05:30
Thakee Nathees
bbe199ea80 Documentation generation for GDScript
- ClassDoc added to GDScript and property reflection data were extracted
from parse tree

- GDScript comments are collected from tokenizer for documentation and
applied to the ClassDoc by the GDScript compiler

- private docs were excluded (name with underscore prefix and doesn't
have any doc comments)

- default values (of non exported vars), arguments are extraced from the
parser

- Integrated with GDScript 2.0 and new enums were added.

- merge conflicts fixed
2020-11-29 19:45:36 +05:30
Rémi Verschelde
dc176af890 Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-rework
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-28 09:04:25 +01:00
bruvzg
f215b764e6 [Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Eric M
d256a0a87f Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Rémi Verschelde
9cf336cdb5 doc: Warn about using Node internal processing
See #43689.

Also 'fixed' some spelling for behavior in publicly visible strings.
(Sorry en_GB, en_CA, en_AU, and more... Silicon Valley won the tech spelling
war.)
2020-11-20 09:52:37 +01:00
Aaron Franke
776b0c9f1d Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde
6b25a6912a Merge pull request #43457 from reduz/refactor-builtin-methods-again
Refactor variant built-in methods yet again.
2020-11-11 21:27:34 +01:00
reduz
856f753098 Refactor variant built-in methods yet again.
* Using C-style function pointers now, InternalMethod is gone.
* This ensures much better performance in typed code.
* Renamed builtin_funcs to utility_funcs, to avoid naming confusion
2020-11-11 16:36:36 -03:00
Rémi Verschelde
6c1e6aac96 Merge pull request #43417 from akien-mga/variant-default-constructors-docs
Variant: Sync docs with new constructors, fixes to #43403
2020-11-10 08:28:08 +01:00
Rémi Verschelde
be85892c04 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
ef352d48d5 Variant: Rename Type::_RID to Type::RID
The underscore prefix was used to avoid the conflict between the `RID` class
name and the matching enum value in `Variant::Type`.

This can be fixed differently by prefixing uses of the `RID` class in `Variant`
with the scope resolution operator, as done already for `AABB`.
2020-11-09 16:29:04 +01:00
reduz
67097782d5 Refactored variant constructor logic 2020-11-09 08:54:43 -03:00
Rémi Verschelde
85fac85092 Merge pull request #43385 from reduz/reorganize-core
Reorganize and clean up core/ directory
2020-11-08 10:41:17 +01:00
reduz
4f7590cecf Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Juan Linietsky
4e3446ee45 Merge pull request #43371 from reduz/variant-setget-refactor
Refactored Variant setters/getters
2020-11-07 16:34:54 -03:00
reduz
36395b992e Refactored variant setters/getters
-Discern between named, indexed and keyed
-Get direct access to functions for typed GDScript and GDNative bindings
-Small changes to some classes in order to work with the new setget binder
2020-11-07 15:16:15 -03:00
Juan Linietsky
df0e8ecb39 Merge pull request #43323 from reduz/variant-bind-rework2
Refactored Variant Operators.
2020-11-06 14:24:38 -03:00
reduz
beaa09a47d Refactored Variant Operators.
-Using classes to call and a table
-For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
2020-11-06 12:45:50 -03:00
Yuri Roubinsky
daa8361a91 Exposed randi_range to global funcs + renamed rand_range to randf_range 2020-11-06 17:06:26 +03:00
Rémi Verschelde
0ef242897f Merge pull request #43310 from akien-mga/doc-classref-sync
doc: Sync classref with current source
2020-11-04 16:20:48 +01:00
Rémi Verschelde
81ca833e28 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
Hugo Locurcio
b51c299690 Optimize SVG using svgcleaner --multipass
This decreases the editor binary size by about 8 KB.
2020-10-25 10:02:37 +01:00
Rémi Verschelde
15c6138115 Merge pull request #42925 from Chaosus/graph_rename_signals
Removed underscore from GraphEdit begin/end_node_move signals
2020-10-20 08:45:16 +02:00
Yuri Roubinsky
1aa407b848 Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
reduz
fd1ac54549 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
Rémi Verschelde
b1f68ade4f Merge pull request #42749 from KoBeWi/quality_pr
Bind missing constant in VisualScriptPropertyGet
2020-10-12 21:46:23 +02:00
Tomasz Chabora
d6603a07ec Bind missing constant in VisualScriptPropertyGet 2020-10-12 19:39:15 +02:00
Rémi Verschelde
556bc141a1 Merge pull request #42610 from jak6jak/set_values
Fixed a bug which caused Set Index to not function
2020-10-08 10:23:29 +02:00
Jacob Edie
c6eeea86a3 added temp variable because *p_inputs[2] is the same as *p_outputs[0] 2020-10-06 22:12:47 -04:00
Rémi Verschelde
42d1f89833 Merge pull request #41861 from Razoric480/fix-vscript-value-by-type
Add a function to sanitize variant values in visual script
2020-09-18 17:36:01 +02:00
Francois Belair
394e2a8cd5 Add a VScript func to sanitize variant values
Fixes #27611
2020-09-18 11:19:53 -04:00
Rémi Verschelde
5f57ed01a5 Merge pull request #40973 from Paulb23/code_edit
Add CodeEdit and TextEdit gutter system
2020-09-10 22:02:44 +02:00
Paulb23
83f321207a Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit 2020-09-10 20:35:28 +01:00
bruvzg
87f5ff9391 [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Hugo Locurcio
87f2ca7d57 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
Aaron Franke
c1845470bf Make all String float conversion methods be 64-bit 2020-07-27 18:38:53 -04:00
Andrii Doroshenko (Xrayez)
65f416f410 Make unsaved scripts in the script editor more user-friendly
Unsaved scripts were previously displayed with blank tabs, which are
mostly a result of deleted or improperly moved scripts.

This patch makes sure that those kind of scripts are displayed as
"[unsaved]" now, and ensures that scripts are removed from the list
while deleting scripts from the filesystem dock preventing the unsaved
tabs to appear in the first place (a user is already prompted with
"no undo" warning while deleting any file).

A user is always prompted to save those "[unsaved]" scripts if they
attempt to close them without saving in any case except as described
above.
2020-07-26 16:05:44 +03:00
Rémi Verschelde
1e9c74cad6 Merge pull request #33760 from nekomatata/script-editor-init-optimization
Optimized ScriptEditor initialization when many scripts are loaded
2020-07-26 14:05:56 +02:00
Rémi Verschelde
2f139a1299 VisualScript: Fix -Wduplicate-branches warning
When VSDEBUG is a no-op (default), those branches did the same (nothing).
2020-07-22 16:57:28 +02:00
PouleyKetchoupp
185e87d810 Optimized ScriptEditor initialization when many scripts are loaded
This change avoids the editor to freeze for several seconds when a
project with lots of scripts is loaded in the editor.

It focuses on a few heavy operations previously executed on all
previously loaded scripts:
- Initialize script resource (script validation/parsing) only
on focus
- ScriptTextEditor: code editor and edit menu are added to the
scene only on focus
- Add to recent scripts only when opening new scripts
(load/save scene metadata)
2020-07-17 09:02:24 +02:00
Paulb23
fcc4a3f96c Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
2020-07-11 17:09:58 +01:00
Paulb23
dd654ed572 Expose Syntax highlighter for editor plugins 2020-07-11 15:40:00 +01:00
Paulb23
04283a1668 Convert syntax highlighters into a resource 2020-07-11 15:26:58 +01:00
Marcel Admiraal
894bc9aa5a Add override keywords. 2020-07-10 13:56:54 +01:00
Rémi Verschelde
6e6fe53c1d Merge pull request #39622 from akien-mga/docdata-skip-empty-scripting-langs-builtins
DocData: Skip language-specific ClassDoc without methods/constants
2020-06-17 15:52:15 +02:00
Rémi Verschelde
a2a30f3c10 DocData: Skip language-specific ClassDoc without methods/constants
Removes the useless `@C#`, `@NativeScript` and `@VisualScript` entries.
2020-06-17 15:09:07 +02:00