Commit graph

356 commits

Author SHA1 Message Date
Rémi Verschelde
cb8f045de8
Merge pull request #49650 from KoBeWi/FindReplaceCrash
Fix crash with FindReplaceBar
2021-06-24 19:21:01 +02:00
kobewi
35a38717e2 Fix crash with FindReplaceBar 2021-06-24 15:38:29 +02:00
Aaron Franke
0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
kobewi
7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02: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
Rémi Verschelde
58c1235111
Merge pull request #49265 from KoBeWi/keepfreplace_2_keepers_of_replace
Move FindReplaceBar out of CodeTextEditor
2021-06-09 21:07:27 +02:00
kobewi
da6aebeb4c Move FindReplaceBar out of CodeTextEditor 2021-06-08 23:23:07 +02:00
kobewi
a97546d4ea Don't save built-in script when adding method 2021-06-06 23:58:35 +02:00
Rémi Verschelde
875ed4d600
Merge pull request #47336 from Calinou/rename-shader-file-extension
Rename the `.shader` file extension to `.gdshader`
2021-06-04 11:26:14 +02:00
Yuri Roubinsky
af3f047f49 Fixed console error spam (about invalid edited scene index) 2021-05-26 19:28:38 +03:00
Yuri Roubinsky
f100fb9f10 Updates script list colors after theme is changed 2021-05-20 09:02:59 +03:00
Hugo Locurcio
16876bec76
Fix crash when trying to save with no scenes and scripts open
This could occur when attempting to save project settings when
no scenes or scripts are open (which is common in a brand new project).
2021-05-18 19:48:38 +02:00
Rémi Verschelde
35edb77d1f
Merge pull request #37796 from Gogsi/master
Improve consistency in file order
2021-05-18 11:45:05 +02:00
Georgi Genkov
a8c83a7b35 Change EditorFileSystem and ScriptEditor file sorting order to improve consistency.
Fixes #37721.
2021-05-18 10:42:06 +02:00
trollodel
bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
sent44
2b30728ebf Add get_base_editor to ScriptEditorBase 2021-05-15 18:47:00 +07:00
Hugo Locurcio
39f9b92f54
Save the current script when pressing Ctrl + S if no scene is open
- Tweak the dialog messages to be more informative.
  - The "Saved N modified resources" dialog is not a warning per se,
    so make it more explicit.
2021-05-09 12:29:50 +02:00
Rémi Verschelde
8962d36bb1
Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
2021-05-07 00:52:50 +02:00
Rémi Verschelde
6e621441ca
Merge pull request #45607 from Calinou/improve-editor-theme
Improve the editor theme
2021-05-06 16:45:07 +02:00
Hugo Locurcio
0ade686601
Save the current script when adding a new method via signal connection
This makes it possible for external editors to pick up the changes.
Most modern editors should reload the file automatically,
but some older/lightweight editors may ask the user instead
(or only warn after trying to save in the external editor).

This closes #41283.
2021-05-05 23:31:15 +02:00
Hugo Locurcio
e905e8f145
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
Hugo Locurcio
60b70c77e0
Improve the editor theme
The editor theme now makes use of rounded corners and less borders
to follow modern visual trends.

The default theme's colors were also tweaked to make the blue hue
more subtle (similar to the Arc theme, which was removed as a
consequence). The Alien theme was replaced by a Breeze Dark theme,
which should blend in well with the KDE theme.
2021-04-27 22:38:26 +02:00
Rafał Mikrut
504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Hugo Locurcio
b191a7547c
Rename the .shader file extension to .gdshader
This lets third-party software recognize Godot shaders more easily,
without relying on guesswork since the `.shader` extension is generic.
2021-03-24 21:33:44 +01:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
kobewi
12f5a5a701 Don't save unchanged script upon closing 2021-03-06 20:17:19 +01:00
reduz
f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
Rémi Verschelde
1218441b16
Merge pull request #44514 from madmiraal/split-os-execute
Split OS::execute into two methods
2021-01-12 16:17:04 +01:00
Michael Alexsander
4194447a21 Fix script list only showing their names regardless of display option 2021-01-11 18:01:21 -03:00
Marcel Admiraal
2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde
44357ddc28
Editor: Fix invalid use of Node::get_viewport() after rename of EditorNode::get_viewport()
Fixes #44761, was a regression from #44524.

The PR passed CI because EditorNode::get_viewport() used to shadow Node::get_viewport()
(which was a bug in itself, fixed by #44524), so once it was renamed the existing code
relying on it fell back to the now available Node::get_viewport().
This might bite some thirdparty modules too.
2020-12-28 19:51:39 +01:00
Marcel Admiraal
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Michael Alexsander
ed488b72a6 Fix filename disambiguation on scripts in certain occasions 2020-12-22 17:27:06 -03:00
Marcel Admiraal
8509c8c8fc 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
Tomasz Chabora
2c048ea164 Cleanup unused engine code 2020-12-09 12:12:36 +01:00
Rafał Mikrut
e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +01:00
Thakee Nathees
42bfa16996 Refactor DocData into core and editor (DocTools) parts 2020-12-02 00:48:39 +05:30
Thakee Nathees
d0e7d9b62f 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
a09846e015
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
99666de00f
[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
efe5c250d5 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
reduz
127458ed17 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
reduz
f2397809a8 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
Paulb23
4d7df24d46 Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit 2020-09-10 20:35:28 +01:00
Tomasz Chabora
3082def404 Properly disambiguate unsaved scripts 2020-07-31 22:43:40 +02:00
Rémi Verschelde
e016859c3b Script editor: Fix crash when root script is null
Bug introduced in #40746.
2020-07-27 15:18:31 +02:00
Rémi Verschelde
6b3f013a82 Script editor: Fix open dominant logic for language-specific external editors
Follow-up to #40735.

Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2020-07-27 10:30:03 +02:00
Rémi Verschelde
b5f110c77e Script editor: Don't open dominant script in external editor
Fixes #13429.
2020-07-26 23:18:05 +02:00