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
kobewi
4023ace08d Add Advanced Settings switch to Editor Settings 2024-09-17 12:20:55 +02:00
Rémi Verschelde
109203d472
Merge pull request #85331 from RobProductions/customize-navigation-controls
Add full customization of 3D navigation controls
2024-08-28 00:10:19 +02:00
Adam Scott
dfe7ef7964
Fix weird plural public method names 2024-08-27 13:37:37 -04:00
kobewi
681769e2c9 Fix undoredo handling in some dialogs 2024-07-04 14:17:47 +02:00
Matt Enad
9d343ced58 Add customizable 3D navigation settings
This commit adds 3 new editor settings for orbit, pan, and zoom mouse buttons, and 6 new shortcuts which act as modifiers for the navigation controls. These new shortcuts replace the old orbit, pan, and zoom modifier settings.

The `navigation_scheme` setting now acts as a preset which changes the new options added above, and the new settings are what drives 3D navigation instead. A new struct is used for ordering the navigation logic so that actions with fewer shortcuts are checked first. When the editor starts, the preset detection will run to automatically update user settings from old Godot versions. When the setting is changed, the hint values for the mouse buttons are dynamically updated to show the user the corresponding shortcut values.

The new doc fields have been generated and the description for the new settings are filled out. The `navigation_scheme` entry now has more consistent styling and added control descriptions that were missing before.
2024-07-02 12:37:57 -04: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
A Thousand Ships
d519715d94
[Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
A Thousand Ships
926afccbd8
[Scene] Add SceneStringNames::panel 2024-05-30 22:54:50 +02:00
Haoyu Qiu
55459dd74e Disable Clear All button when not filtering in Editor Settings 2024-05-19 19:29:48 +08:00
A Thousand Ships
ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Haoyu Qiu
479b7afa8e Add context support for editor property name i18n 2024-03-31 18:40:14 +08:00
Haoyu Qiu
8cd1ebbd6d Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
Hendrik Brucker
02a33b67a8 Redesign the graph editor for visual shaders 2024-02-22 20:40:09 +01:00
kobewi
a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01:00
Rémi Verschelde
8fc2407085
Merge pull request #86654 from ryevdokimov/fix-listening-for-input-escape
Prevent escape key from closing Editor Settings window when filtering for shortcuts
2024-02-02 12:01:52 +01:00
Yuri Sizov
dc3b07e551 Introduce editor theme spacing presets
This change adds a new editor setting related to theming
which controls base and additional spacing used in the
generated editor theme. These values can also be changed
manually by the user to customize their experience.

Limited effort was applied to make sure both Compact and
Spacious presets work and look fine, but further tuning
and adjustments are totally expected. Some controls will
require layout changes or additional fixes to their constants.
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
Robert Yevdokimov
eb565780e7 Prevent escape key from closing Editor Settings window when filtering for shorcuts 2024-01-05 19:24:55 -05:00
Michael Alexsander
c7d0565681
Make the search bars in the "Project Settings" dialog grab focus when they appear 2023-09-25 01:09:29 -03:00
A Thousand Ships
75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
Haoyu Qiu
b8b0339549 Improve undo action names
* Avoid concating strings manually for better i18n and easy l10n
   * Use `vformat` when possible
   * Use separate strings if the changing part is only a few hardcoded strings
* Don't put a period at the end of the name
2023-09-12 18:53:50 +08:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Haoyu Qiu
997ff8f14a Translate undo/redo messages in settings dialogs 2023-04-23 17:49:55 +08:00
Ryan Roden-Corrent
894ce41180
Apply clamp_to_embedder on parent resize and popup.
Fixes #75084.

The clamp_to_embedder setting was added in 8be16e0704,
but was not set on any of the in-editor dialogs.

This patch sets `clamp_to_embedder` on editor dialogs so they cannot be dragged out of the frame.
This also modifies `clamp_to_embedder` so a window is clamped to the bounds of an embedder when
it pops up and when the parent is resized.
2023-03-27 07:08:29 -04:00
Rémi Verschelde
bcaf048f33
Merge pull request #71379 from KoBeWi/destruction_of_compatibility_function
Remove set_drag_forwarding_compat()
2023-01-18 17:40:13 +01:00
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
kobewi
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Juan Linietsky
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
Rémi Verschelde
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
Rémi Verschelde
2fadc1299d
Merge pull request #67871 from Calinou/editor-theme-add-oled-preset
Add Black (OLED) editor theme preset
2022-11-28 08:46:12 +01:00
kobewi
538b84d41a Don't update EditorSettings dialog unnecessarily 2022-11-21 14:47:16 +01:00
Rindbee
12787ad57d Fix memory leak in EditorSettingsDialog
Delete `TreeItem`s that are not in `Tree`, `TreeItem` needs to be deleted manually.
2022-11-11 14:21:46 +08:00
kobewi
15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
Hugo Locurcio
f613db0db9
Add Black (OLED) editor theme preset
This preset uses a fully black background to reduce power usage on OLED
displays, leading to increased battery life on laptops with OLED displays.

This preset is also useful for late night sessions, as OLED displays
have a near-infinite contrast ratio.

This also adds a Draw Extra Borders editor setting which draws borders
around some interactive nodes. This setting is required for good
usability of a theme with a fully black background.

Visibility of disabled text (including unselected tab names) has been
slightly increased for better accessibility, regardless of the editor
theme preset in use.
2022-10-26 01:23:53 +02:00
Eric M
598ee4266c Split action_map_editor file into one file per class it contained.
* ActionMapEditor
* EventListenerLineEdit
* InputEventConfigurationDialog
2022-10-06 18:29:20 +10:00
EricEzaM
cb6d7fd059 Add searching by event for Editor Settings shortcuts and Project Settings input map.
* Focus into the LineEdit, then perform input to search the list of events by the events assigned.
* New specialised editor-only control for this: EventListenerLineEdit. Line edit is a good candidate for such a control because you can focus it, override it's input handling, and show the event all in one control.
Update InputEventConfigurationDialog to use event listener line edit rather than the separate tabs.
* Cleaner look - no need for tabs.
* Simpler code.
2022-10-03 19:56:34 +10:00
Rémi Verschelde
919d8b3711 Merge pull request #65290 from requizm/fix/65081/cannot_set_escape
Disabled "Escape" button when closing the shortcut window
2022-09-25 11:06:18 +02:00
Eric M
722378479d Update Editor Shortcuts tree creation to always have sections in same order. 2022-09-17 11:41:15 +10:00
Eric M
badea350ac Check TreeItem for nullptr before accessing. 2022-09-15 23:50:52 +10:00
bruvzg
6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
Yuri Sizov
43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
requizm
1c2464a557 Disabled "Escape" button when closing the shortcut window 2022-09-03 18:22:12 +03:00
Micky
97f8c9b97c Rename TreeItem's set_tooltip to set_tooltip_text
`set_tooltip` -> `set_tooltip_text`
`get_tooltip` -> `get_tooltip_text`

For consistency:
`get_button_tooltip` -> `get_button_tooltip_text`
And the `tooltip` parameter in `add_button` was renamed to `tooltip_text`
2022-08-30 11:16:23 +02:00
kobewi
ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
FireForge
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
Rémi Verschelde
532e253a7c
Merge pull request #61455 from fire-forge/tab
Add color contrast to TabContainer backgrounds in the editor
2022-05-31 12:52:03 +02:00
FireForge
7f7244f04a Use consistent casing in editor filter/search bars 2022-05-28 18:43:16 -05:00