Commit Graph

141 Commits

Author SHA1 Message Date
d2d02d0ea8 EditorNode: Add function to load file as scene or resource 2025-03-12 23:59:48 +01:00
466590d0ec Use get_slicec instead of get_slice for single character splitters 2025-03-08 20:36:37 +01:00
5113022dfe Clean up some uses of String::substr
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
4cadfd3eb9 Don't create an UndoRedo action if Autoload order doesn't change after Drag & Drop 2025-01-06 22:21:45 +01:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
f241c1fda0 Remove unused header in editor.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:38 +08:00
8f16f864a6 Merge pull request #99765 from dalexeev/core-fix-json-from-to-native
Core: Fix `JSON.{from,to}_native()` issues
2024-12-10 14:15:53 -06:00
af56d6e8e8 Use SceneStringName in more places 2024-12-02 14:39:16 +01:00
bd1a35ce9e Core: Fix JSON.{from,to}_native() issues 2024-11-29 12:43:06 +03:00
562c666e3d Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 -07:00
e8462bf3ac Allow using Unicode identifier for Autoload name 2024-09-21 16:47:19 +08:00
14321b8ed5 Set auto translate mode for drag previews
- Controls
  - `LineEdit`, `TextEdit`: Always disabled since it's dragging user input.
  - `TabBar`: Use the same auto translate mode as the node.
  - `RichTextLabel`: Always disable since auto translation is done
    differently from other controls (selection text you get
    programmatically is always after auto translation).
- Editor
  - Disable drag preview auto translation if the text is user input,
    filename, or class name.
  - Also disabled unexpected auto translation for audio bus effect names.
2024-09-19 19:21:29 +08:00
8bf4ecc026 Add String.is_valid_unicode_identifier()
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
2d4e573b20 Fix autoload node cannot be accessed by plugin on start-up 2024-07-26 10:29:38 -04:00
39369db029 Fix synchronization of global class name 2024-06-25 18:33:07 -04:00
fbb879debd [Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
d519715d94 [Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
97105f236d Fix incorrect autoload path in error 2024-06-18 00:50:56 -07:00
ee79386f7b [Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
9e13b90ce8 Merge pull request #81177 from Calinou/filedialog-focus-path-shortcut
Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog
2024-03-05 09:55:36 +01:00
2bd714e34e Allow configuring the script filename casing rule
Defaults to "Auto", which detects the casing based on the
preference of the currently selected language (C# for example
prefers PascalCase whereas GDScript prefers snake_case).
2024-03-05 09:43:29 +01:00
4f8d7cae26 Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog
This also tweaks EditorFileDialog to use the same shortcut,
while making it select the path text after focusing
(like in most file managers).

Ctrl + L / Cmd + Shift + G can also now be used to focus on the
property name in the project settings editor, as well in the
Input Map, Autoload, Shader Globals and Global Groups tabs.
2024-03-05 00:02:09 +01:00
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
1910f91f17 Improve "Add" button consistency in Project Settings
* Adds an icon to all the input-adjacent add/remove buttons
 * Adds a separator next to the action map "add" button
 * Changes the Shader Globals editor to be consistent with the others
 * Adds a clear button to the shader global name input
2024-01-11 17:13:23 -03:00
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
bc1949d797 Correctly check scripts that must inherit EditorPlugin
Also updates some error messages related to this kind of check
across the codebase.
2023-11-23 16:24:43 +01:00
75d27e3893 Merge pull request #79832 from DarkMessiah/fix-autoload-settings
Fix undo methods for DELETE in EditorAutoloadSettings
2023-11-09 18:06:28 +01:00
75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
8ecc0c4f47 Fix accessing editor theme items throughout the UI
This also exposes `EditorInterface::get_editor_theme`.
2023-09-15 14:51:01 +02:00
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
2cd63a1ef0 Made hidden ProjectSettings groups more explicit 2023-08-23 22:43:43 +02:00
3462ecf2fb Fix undo methods for DELETE in EditorAutoloadSettings 2023-07-23 19:19:40 +02:00
4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
26581ca574 Add some missing translatable editor strings 2023-02-10 16:55:50 +08:00
bcaf048f33 Merge pull request #71379 from KoBeWi/destruction_of_compatibility_function
Remove set_drag_forwarding_compat()
2023-01-18 17:40:13 +01:00
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +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
e16acf26db Merge pull request #63512 from MmAaXx500/autoload-double-add-remove
Prevent autoloads from being added or removed twice
2022-11-29 16:48:58 +01:00
69bb7e5b11 Fix singleton scene cyclic loading 2022-11-25 12:43:55 -05:00
15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
5947f22be9 Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
7543a5e014 Rename queue_delete => queue_free
# Conflicts:
#	editor/plugins/tiles/tiles_editor_plugin.cpp
2022-10-24 22:07:02 +01:00
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
d4555ef5fb Add String.to_{camel,pascal,snake}_case methods 2022-08-30 12:36:24 +03:00
10a56981dc Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00