Commit graph

410 commits

Author SHA1 Message Date
Rémi Verschelde
fa48a51183
Merge pull request #87688 from AThousandShips/what_is_this
Remove unnecessary `this->` expressions
2024-01-29 13:18:09 +01:00
Yuri Sizov
d644b9b640 Better hide internal properties from users 2024-01-29 12:35:10 +01:00
A Thousand Ships
15369fdb1d
Remove unnecessary this-> expressions 2024-01-29 09:59:18 +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
c772a5b050
Merge pull request #78960 from kleonc/inspector-follow-focus
Make editor inspector follow focus
2024-01-04 16:38:46 +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
kobewi
ce9fec9b4d Improve editing of min/max particle properties 2023-12-20 06:31:08 +01:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Yuri Sizov
215e036600 Add bulk change guards to successive theme overrides in Editor and GUI 2023-10-19 18:14:14 +02:00
Danil Alexeev
f56532c577
Editor: Fix some issues with EditorHelpTooltip 2023-10-10 20:02:47 +03:00
kobewi
a6de7a8a3f Allow contextual plugins to persist temporarily 2023-10-06 15:58:50 +02:00
kobewi
09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
Michael Alexsander
ae91644c73
Revamp how documentation tooltips work 2023-10-03 17:40:51 -03:00
Jack Wilsdon
4a33a51ea4 Use theme icon size when calculating category minimum size
This previously used the underlying size of the icon, causing the
category to grow incorrectly when re-rendered.

Fixes #82527
2023-09-29 18:50:32 +01:00
Wilson E. Alvarez
c844988e40
Expose EditorInspector::get_edited_object to GDScript 2023-09-23 09:47:07 -04: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
Rémi Verschelde
d6d8cb1a17
Merge pull request #81408 from jsjtxietian/fix-property-array-tooltip-shows-wrong-ID-on-later-pages
Fix property array tooltip shows wrong ID on later pages
2023-09-07 14:04:58 +02:00
jsjtxietian
d4ac65bc48 Fix property array tooltip shows wrong ID on later pages
Also do some cleanup, use`element_position` instead of
`begin_array_index + i`
2023-09-07 19:04:28 +08:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Rémi Verschelde
fa3428ff25
Merge pull request #81221 from dalexeev/editor-inspector-and-signal-dock-improvements
Editor: Inspector and Signal docks improvements
2023-09-03 00:21:04 +02:00
Danil Alexeev
c33ca26e17
Editor: Inspector and Signal docks improvements 2023-09-02 08:50:28 +03:00
Rémi Verschelde
5588980e47
Merge pull request #80184 from MewPurPur/gray=abstract
Use the gray color for all abstract classes
2023-09-01 16:00:58 +02:00
MewPurPur
398ca4e71a Use the gray color for all abstract classes 2023-08-31 12:59:18 +03:00
Rémi Verschelde
c1e85c6593
Merge pull request #80617 from jmb462/fix_80524
Add buttons to reorder inspector array items without dragging
2023-08-29 12:43:34 +02:00
Jean-Michel Bernard
a871679aac Add buttons to reorder inspector array items without dragging 2023-08-27 13:18:16 +02:00
Yuri Sizov
2445414aa0 Avoid unnecessary inspector updates when loading or switching scenes
This should result in some noticeable performance improvements,
aside from fixing bugs due to conflicts in logic.
This also simplifies some related code identified while debugging.
2023-08-12 13:32:59 +02:00
kobewi
7f41403a6f Standardize dialog input validation as a new class 2023-08-08 16:14:35 +02:00
Hendrik Brucker
a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
kleonc
c6e895050d Make editor inspector follow focus 2023-07-02 22:36:08 +02:00
MewPurPur
c0453a544d Fix enum tooltip with no description 2023-06-21 19:18:08 +02:00
Gilles Roudière
41890ff9c3 Fix compilation on gcc13 2023-06-16 19:24:04 +02:00
lawnjelly
b69c8b4791 Single Compilation Unit build.
Adds support for simple SCU build (DEV_ENABLED only).
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-06-06 15:36:51 +01:00
Yuri Sizov
5b5186383e
Merge pull request #77148 from ajreckof/prevent_unselectable_editor_property_from_being_selected_on_RMB
Prevent selecting unselectable `EditorProperty` with RMB
2023-06-02 13:10:36 +02:00
Yuri Sizov
fc83a2e323
Merge pull request #71843 from Rindbee/do-not-cache
Do not cache the doc information written by user in the script in Inspector
2023-05-29 17:23:48 +02:00
kobewi
adf427c806 Translate inspector changes indicator 2023-05-26 15:55:51 +02:00
ajreckof
088435ab78 prevent selecting unselectable EditorProperty with RMB 2023-05-17 05:56:24 +02:00
Rémi Verschelde
f868b4781b
Merge pull request #76684 from KoBeWi/this_branch_is_meta
Add background panel to new meta dialog
2023-05-16 11:00:21 +02:00
Samuele Panzeri
a103cd76bb Fix skeleton 3d editor crash in RC3
Control notifies a theme changed before the editor has entered the tree
2023-05-15 12:12:48 +02:00
kobewi
b732c2b341 Add background panel to new meta dialog 2023-05-03 00:21:05 +02:00
Rindbee
fd75bb562e Do not cache the doc information written by user in the script in Inspector
The doc information of the edited object is cached to reuse it in the next `EditorInspector::update_tree()` call.

This is not suitable for doc information written by users in the script because it is easily changed.
2023-05-02 05:53:09 +08:00
Haoyu Qiu
d24ee551ec Allow EditorInspector to change its property name style when necessary
Previously, an EditorInspector's property name can only be set from
outside. Inspectors used for settings needs to respond to changes in
editor settings. So a few boilerplate code is almost always needed,
including watching for a certain editor setting in `_notification()`.

This commit adds a `set_use_settings_style()` function to tell the
inspector to watch for editor settings changes on its own.
2023-04-29 10:51:00 +08:00
Rémi Verschelde
8cc1762398
Merge pull request #76105 from anvilfolk/tooltip
Fix @export variable tooltips not showing up in Inspector in scripts with inner classes
2023-04-25 09:59:06 +02:00
ocean (they/them)
4bfd539f99 Fix @export variable tooltips not showing up in Inspector when there is
an inner class
2023-04-21 08:39:47 -04:00
Rémi Verschelde
1f5811eb03
Merge pull request #76238 from Calinou/editor-inspector-tooltip-display-enum-descriptions
Display enum value descriptions in the editor inspector help tooltips
2023-04-20 12:42:30 +02:00
Hugo Locurcio
76c0a3fea0
Display enum value descriptions in the editor inspector help tooltips
This makes it possible to see what each value does without having
to open a documentation tab.

Some enum value names may be mismatched as the API doesn't always
match the property hint used in the editor.
2023-04-19 22:56:48 +02:00
bruvzg
0088981c40
[Export] Add readable descriptions and validation warnings to the export options. 2023-04-19 08:35:59 +03:00
Rémi Verschelde
bba753db0d
Merge pull request #75938 from YuriSizov/editor-no-spammy-icons
Prevent errors in the Inspector when looking for script icons
2023-04-11 19:41:07 +02:00