Commit graph

55 commits

Author SHA1 Message Date
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde
0fe0f1e992
Merge pull request #86605 from KoBeWi/update_all_of_the_tree_not
Don't update tree on deselect
2024-04-26 15:13:21 +02:00
Rémi Verschelde
6b8daa498e
SceneTreeEditor: Fix crash when TreeItem is removed before callback
Fixes #90235.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2024-04-05 16:53:33 +02:00
RedMser
9cd30208d6 Improve SceneTreeEditor usability
- Mark contextually relevant node
- Remember/Clear selection as appropriate
- Scroll to marked/selected node
2024-03-31 21:35:10 +02:00
Haoyu Qiu
f298aaa956 Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
Rémi Verschelde
ae8d43b0bb
Merge pull request #88003 from kitbdev/dock-manager-fixes
Refactor and fix issues in Editor Dock Manager
2024-03-24 01:13:26 +01:00
kit
0c9c84f7a6 Refactor and fix issues in Editor Dock Manager
Extract Dock Context Menu.
2024-03-16 13:51:31 -04:00
Aaron Franke
0700b807a2 Allow node visibility to work with custom user-provided node types 2024-03-07 17:25:06 -08:00
kobewi
ffadba0b08 Allow to easily rename multiple nodes
Co-authored-by: ajreckof <tbonhoure@ymail.Com>
2024-03-03 13:16:21 +01:00
Muller-Castro
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
Robert Yevdokimov
13e82094ee Remove word duplicates in comments and strings, and fix casing and punctuation 2024-02-23 17:28:28 -05:00
Rémi Verschelde
92fcbe2f5c
Revert "Allow configuration warnings to refer to a property"
This reverts commit bf37a9bac6.
2024-02-17 19:04:18 +01:00
Michael Alexsander
7b42c24550
Make auto translation inheritable 2024-02-15 16:51:19 -03:00
RedMser
bf37a9bac6 Allow configuration warnings to refer to a property
This is used by the inspector so it can show a warning icon on
a specific property.
2024-02-08 23:05:20 +01:00
Rémi Verschelde
ef9cb3dfa5
Merge pull request #87535 from Mickeon/scene-tree-configuration-warnings-cleanup
Improve appearance of Node configuration warnings
2024-01-29 13:17:17 +01:00
Micky
3e4e0f08c4 Improve appearance of Node configuration warnings 2024-01-27 13:03:07 +01:00
ajreckof
2f697926b0 Fix renaming a node to the name of its siblings breaking NodePath
Also fix cases where node name was not visually updated because name was not changed

Co-Authored-By: Nông Văn Tình <53887662+nongvantinh@users.noreply.github.com>
2024-01-16 15:18:30 +01:00
Yuri Sizov
635b8a1474 Split theme generation logic into several subroutines
This change introduces a new theme configuration struct to be
passed to the aforementioned routines to better control reuse
of styles and definitions in the generator.

Everything not passed and not explicitly shared is scoped so it
is not automatically accessible throughout the routine. This
should ensure that the decision to share styles is a conscious one.

In the future we will try to reduce the number of unique definitions
and share most of it. This PR is a stepping stone on this path.

This also puts the effort into separating redefinitions of
default theme items vs custom types introduced only by the editor.
In a few cases where editor-specific definitions need to reference
default definitions we simply fetch them from the theme. It's not
ideal and hides the dependency a bit, but hopefully these cases
will be abstracted properly in due time.
2024-01-16 11:57:45 +01:00
Yuri Sizov
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
kobewi
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde
6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
Rémi Verschelde
73c5deff76
Merge pull request #82916 from jsjtxietian/update-scene-tree-tooltip-after-editor-description-chnage
Support updating tooltip immediately after editor description change
2024-01-03 15:41:31 +01:00
kobewi
413f55b06f Don't update tree on deselect 2023-12-29 13:15:15 +01:00
Haoyu Qiu
c62c0fb2d2 Improve action name for ungroup button in Scene dock 2023-12-22 19:54:14 +08:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Wilson E. Alvarez
80fb8db31f
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-12-13 11:06:26 -05:00
Yuri Sizov
0481a0b8b3 Merge pull request #82528 from SaracenOne/path_types
Add support for exporting script classes without a name
2023-12-08 15:22:48 +01:00
jsjtxietian
4680ced5fa support updating tooltip after editor description change 2023-11-15 14:27:49 +08:00
Saracen
7559eb1667 Script path type support in editor:
Allow script path type hints to be used in drag and drop
and scene tree popup.
2023-11-08 00:18:40 +00:00
Haoyu Qiu
3f00d713b8 Allow dragging editable children
But not allow dropping inside the scene tree editor.
2023-11-01 23:54:38 +08:00
Saracen
29c2615352 Remove toggling of unique names in subscenes 2023-10-28 02:55:45 +01:00
Silc Lizard (Tokage) Renew
1b95827d3e Implement AnimationManager the base class of AnimationPlayer/Tree 2023-09-29 08:23:57 +09:00
Yuri Sizov
b351cffddf Fix theme access and improve UX in AnimationTree editor 2023-09-23 21:47:27 +02:00
A Thousand Ships
75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
Yuri Sizov
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
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
kobewi
b88007b6c5 Properly remember custom text color in scene tree 2023-08-28 02:37:47 +02:00
Martin Boué
bf4cbd4129 Show only compatible nodes in 'Select a node' window
Fixes https://github.com/godotengine/godot-proposals/issues/7217
2023-08-18 18:52:00 +02:00
Hugo Locurcio
e9f723006a
Use compile-time Unicode string conversion
Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
2023-08-07 10:38:16 +02:00
kobewi
05ab444357 Show valid types in SceneTreeDialog 2023-08-04 13:50:27 +02:00
Rémi Verschelde
179e3d6ab9
Merge pull request #78292 from ajreckof/Fix-batch-rename-for-unique-name-and-empty-name-
Fix batch rename for unique name and empty name
2023-08-03 18:33:37 +02:00
ajreckof
4909396cfc Fix batch rename for unique name and empty name. 2023-08-03 18:26:58 +02:00
Septian
837df886f3 Fix dragged nodes have icon size 2023-07-10 20:18:18 +07:00
Rémi Verschelde
a12d9df9e1
Merge pull request #71024 from marzecdawid/better-cursor-behaviour-in-tree-with-ctrl
Fix cursor behavior for multiselect in Tree while holding CTRL
2023-07-08 18:14:48 +02:00
Rémi Verschelde
5205ff69ca
Merge pull request #79090 from mb4c/wrap-tooltip
Add tooltip description wrapping in scene tree and plugin settings
2023-07-07 16:04:41 +02:00
mb4c
d007be2d14 Add tooltip description wrapping in scene tree and plugin settings 2023-07-07 11:16:34 +02:00
Alfonso J. Ramos
b2bef8c47b Do not change a node unique name to the same name 2023-07-06 16:27:34 -05:00
Dawid Marzec
9abbdea95e Fix cursor behaviour in Tree while holding CTRL 2023-06-21 20:44:29 +02:00
Rémi Verschelde
bfec390026
Merge pull request #76672 from kleonc/scene-tree-item-unify-tooltip-creation
Unify setting tooltips for items in `SceneTreeEditor`
2023-06-20 00:01:29 +02:00
Rémi Verschelde
2c22e56e37
Merge pull request #77992 from ajreckof/Prevent-unselectable-nodes-when-switching-filter-and-no-children-match-the-new-filter
Prevent unselectable nodes when switching filter and no children match the new filter.
2023-06-15 10:50:22 +02:00