Commit Graph

157 Commits

Author SHA1 Message Date
d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
fec0396cac fix CollisionShape3D Shape Size handle will missing
when Script editor floating
2023-08-15 12:41:20 +08:00
b883f32188 Check for unsaved changes when closing a scene 2023-07-18 14:27:56 +02:00
000471ee56 Add unsaved status for script and shader editors 2023-07-18 14:18:36 +02:00
b4d6b47c17 Add multi window code and shader editors 2023-05-10 09:14:21 +02:00
0b3fba45c6 Move convert_indent into CodeEdit 2023-05-07 13:08:37 +01:00
aaf02ec04a Close built-in shaders when closing scene 2023-04-09 22:10:43 +02:00
de49bec30e Re-enable script editor File menu shortcuts when the menu is hidden 2023-03-03 12:14:51 -06:00
a197d6ef4e Support editing JSON in ScriptEditor 2023-01-28 16:06:13 +00:00
c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
ba9e619b51 Use forward-declarations in EditorPlugin where possible 2022-11-11 20:25:51 +01:00
d499071e5b Set the shortcut context for the edit/search/goto menus to the ScriptEditor so that shortcuts continue to work when FindReplaceBar is focused. 2022-10-25 19:52:42 +10:00
121e1df55b Merge pull request #66300 from KoBeWi/📝🧭
Split script navigation state and edit state
2022-10-05 08:30:49 +02:00
ab0314938e Implement GDScriptTextDocument::willSaveWaitUntil to clean up outdated documents before saving
Implement `GDScriptTextDocument::willSaveWaitUntil` to clean up outdated documents before saving,
then update the document in `GDScriptTextDocument::didSave`.
2022-10-04 15:38:57 +08:00
72a7d874b4 Fix the flickering of the line gutter icon when saving 2022-10-03 19:19:28 +08:00
14435ebcee Split script navigation state and edit state 2022-09-25 23:06:39 +02:00
412e87349a Fix out of sync when the script is edited externally via lsp
Previously, external editing via lsp would modify the modified time of the script,
which caused the internal display of the script to not be refreshed when refocusing
the engine.

Now saving the script externally via lsp will automatically refresh the internal
display.
2022-09-25 23:30:35 +08:00
53d2a9acdd Merge pull request #63576 from KoBeWi/list_clicker
Simplify script list click logic
2022-09-21 15:38:41 +02:00
4656ea8977 VCS: Port Godot 3.5's VCS features to GDExtension 2022-08-31 00:01:42 +05:30
2855b591fb Simplify script list click logic 2022-08-30 13:38:03 +02:00
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
5b02415fd0 Merge pull request #55134 from KoBeWi/script_pillow_or_something
Always soft-reload scripts
2022-05-17 15:09:09 +02:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
f00803b8a5 Merge pull request #56695 from bruvzg/mod_unicode_input 2022-04-05 14:03:39 +02:00
d1207a0504 [Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
5db47c5521 Fix lookup symbol in scripts which doesn't open a tab at first attempt 2022-04-05 10:18:45 +03:00
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
11572c6e30 Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
71fb89390f Save script editor's function list split offset with the editor layout 2022-02-02 22:50:49 +01:00
e461e28c70 Disable ScriptEditor's menu items when they do nothing 2022-01-21 12:12:48 +08:00
f43f68f605 Convert TextEdit callbacks to Callable 2022-01-19 17:26:22 +00:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
ca4c63d654 Always soft-reload scripts 2021-11-19 17:45:16 +01:00
134e4d168b Improve save handling for built-in scripts 2021-11-07 23:51:12 +01:00
87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
31c1215c25 Allow dragging TextFiles from the Filesystem dock 2021-10-12 18:16:08 +01:00
44e260e247 Allow breakpoints in closed files 2021-10-07 19:48:58 +01:00
bec8ae7ba6 Preserve script editor state through tab closes 2021-10-07 19:44:23 +01:00
6596c7bdc2 Add TextFile support across the editor 2021-09-30 13:29:29 +01:00
3143e7df69 Add history navigation in the script editor using extra mouse buttons
This feature is enabled by default, but it can be disabled in the editor
settings in case it interferes with other uses of the extra buttons
(such as push-to-talk in a VoIP program).
2021-09-25 13:33:07 +02:00
80e2c084cd Merge pull request #52479 from KoBeWi/the_close_of_all_tabs
Don't stop closing on unsaved script
2021-09-20 13:16:05 +02:00
1dda47c280 Added status bar and toggle scripts panel button to EditorHelp/VScripts 2021-09-15 11:35:03 +03:00