Commit graph

75 commits

Author SHA1 Message Date
Haoyu Qiu
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
Rémi Verschelde
4d35402c1c
Merge pull request #96400 from Maran23/inputmap-usage-for-filter-and-corresponding-refactor
Use InputMap actions consistently across all LineEdit's that filter an underlying Tree or ItemList.
2024-09-16 13:34:38 +02:00
Rémi Verschelde
ddef729fb2
Merge pull request #96569 from AThousandShips/fix_tree_button
[Editor] Prevent duplicate `Open in Editor` buttons in scene tree dock
2024-09-05 17:44:19 +02:00
Rémi Verschelde
de2f50777e
Merge pull request #95343 from Giganzo/unique-name-dialog
Add ConfirmationDialog when clicking on % button in SceneTree
2024-09-04 17:11:46 +02:00
A Thousand Ships
ab04d76e0e
[Editor] Prevent duplicate Open in Editor buttons in scene tree dock
Duplicate buttons were added when editor description changed
2024-09-04 17:00:57 +02:00
Giganzo
89c009b105 Add ConfirmationDialog when clicking on % button in SceneTree 2024-09-04 12:08:32 +02:00
Marius Hanl
74f64aaf98 Use InputMap actions consistently across all LineEdit's that filter an underlying Tree or ItemList.
- Instead of checking for Key::UP, Key::DOWN, Key::PAGEUP, Key::PAGEDOWN etc., we rather check for the action like 'ui_up' or 'ui_down'.
- Also use AcceptDialog's 'register_text_enter' functionality to consistently close a dialog when ENTER is pressed while the LineEdit has focus (instead of redirecting ENTER keys to e.g. the underlying Tree).
- Unify the LineEdit filter behavior for the SceneTreeDialog and corresponding usages
- Improve OK Button disablement (something should be selected)
2024-08-31 21:10:27 +02:00
Yuri Rubinsky
52889ab7ee [Scene] Add SceneStringName::toggled 2024-08-28 15:14:26 +03:00
kobewi
d917d88b5b Disable text trimming in SceneTreeEditor 2024-08-21 11:08:33 +02:00
Rémi Verschelde
219eba940f
Merge pull request #94773 from Hilderin/fix-add-child-node-problem-no-auto-expand
Fix scene node selection problem when no auto expand
2024-08-19 14:33:53 +02:00
Hilderin
e46280dbb5 Fix scene node selection problem when no auto expand 2024-08-17 06:32:56 -04:00
Giganzo
eb96b7b850 Fix order of Lock and Group icons in SceneTree 2024-08-09 14:06:55 +02:00
Anni Ryynänen
eed6f4fef4
Fix reselecting scene tree node after inspecting a resource
This broke when the `node_selected` connection was removed in #91435.
Here it's returned, but the emit is removed from `_node_removed`. That
preserves the earlier fix while allowing nodes to be reselected.
2024-06-24 13:17:45 +03:00
A Thousand Ships
fbb879debd
[Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
A Thousand Ships
ca18a06ecb
[Scene] Add SceneStringNames::confirmed 2024-06-19 09:40:54 +02:00
Stephen Berry
823b48ffa5
Consistently display script icons for nodes in connect dialog's scene tree editor 2024-06-10 16:06:45 +02:00
A Thousand Ships
0f72b15bc2
Fix some incorrect uses of String over StringName
These were accepting `SNAME` assignments
2024-06-03 13:42:31 +02:00
kobewi
d276e8ba0b Fix scene hash not updated when scene is empty 2024-05-22 14:55:39 +02:00
Haoyu Qiu
e5c321448e Create AudioStreamPlayer when dropping AudioStream
- Create AudioStreamPlayer if dropped in between nodes in the Scene dock
- Create AudioStreamPlayer2D if dropped into 2D editor
- Create AudioStreamPlayer3D if dropped into 3D editor
2024-05-19 20:26:04 +08:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
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