Commit Graph

445 Commits

Author SHA1 Message Date
A Thousand Ships b4c6cc7d82
[Core] Add case-insensitive `String::containsn` 2024-05-08 12:48:01 +02:00
kobewi 5c28814b39 Add as_sortable_control() to unify Container checks 2024-05-08 11:45:52 +02:00
Rémi Verschelde 25324545f2
Merge pull request #91538 from kitbdev/fix-inspector-exit-crash
Fix EditorInspector crash when exiting
2024-05-07 16:49:46 +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
kit 55afb5b680 Fix EditorInspector crash when exiting 2024-05-03 16:27:59 -04:00
ajreckof cba9606611 Add colored margin in Inspector for arrays and dictionaries.
Apply suggestions from code review

Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-Authored-By: Tomek <kobewi4e@gmail.com>
2024-05-03 10:56:23 +02:00
Rémi Verschelde bf00e1efde
Merge pull request #91168 from kitbdev/docks-dont-edit-current-v2
Don't edit current when changing docks v2
2024-04-30 17:03:25 +02:00
Magian e3a7c751f2 Implement tooltips for shader uniform in the inspector.
using regular expressions
2024-04-26 17:48:11 +08:00
kit eefd311456 Don't edit current when changing docks v2 2024-04-25 15:01:20 -04:00
Rémi Verschelde 2ad43045a3
Revert "Don't edit current when changing docks"
This reverts commit 55711b2ee8.
Fixes #91046.
2024-04-23 19:08:16 +02:00
Rémi Verschelde 8ab5ab19c3
Merge pull request #90816 from kitbdev/dock-dont-edit-current
Don't edit current when changing docks
2024-04-22 12:53:00 +02:00
kit 55711b2ee8 Don't edit current when changing docks 2024-04-19 17:10:38 -04:00
Danil Alexeev a714cb9f65
Editor: Display deprecated/experimental messages in tooltips 2024-04-18 14:32:04 +03:00
aaronp64 050ca0c5ed Fix theme_override tooltip caching
theme_override properties have some special handling in EditorInspector.  When caching documentation info for properties, the theme_item_name value (used only for theme_overrides) was not being cached, so it would only be included on first use.  This meant that theme_override property tooltips would show up in the editor the first time a node was selected, but not again after selecting something else/reselecting.  Added theme_item_name to caching to fix this.

Fixes #90395
2024-04-09 14:31:44 -04:00
Haoyu Qiu 479b7afa8e Add context support for editor property name i18n 2024-03-31 18:40:14 +08:00
Rémi Verschelde c9c0205c07
Merge pull request #89631 from dalexeev/editor-fix-inspector-groups-interfering
Editor: Fix same-name (sub)groups interfering in Inspector
2024-03-24 01:20:02 +01:00
A Thousand Ships 79ba22a73f
Use `Vector*` component-wise `min/max/clamp` functions where applicable 2024-03-20 13:47:42 +01:00
Danil Alexeev 9b7dcfa0e2
Editor: Fix same-name (sub)groups interfering in Inspector
Clear (sub)group hashmaps when changing category.
2024-03-18 09:49:21 +03:00
kobewi 7319b612f3 Speed up inspector updates for TileMap 2024-03-07 18:01:30 +01:00
Hendrik Brucker d32e0f808c Make editing properties more intuitive in VisualShader 2024-03-05 13:27:33 +01:00
Muller-Castro 1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
RedMser 7a08b1fcd6 Inspector changes indicator propagates upwards 2024-02-25 21:12:17 +01:00
Rémi Verschelde 6037500219
Merge pull request #69032 from KoBeWi/check_every_changed_setting_in_every_group_everywhere()
Use `check_changed_settings_in_group()` everywhere
2024-02-20 19:34:30 +01:00
kobewi c060ff8b41 Remove error when property is outside inspector 2024-02-20 14:53:16 +01:00
kobewi a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01: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
Rémi Verschelde 9f76398781
Revert "Only update inspector if configuration warning change relevant"
This reverts commit a53793472e.
2024-02-17 19:00:04 +01:00
Danil Alexeev b2f62658a2
Editor: Fix skipping normal category followed by custom one 2024-02-14 11:28:53 +03:00
Rémi Verschelde 85869957e9
Merge pull request #88182 from RedMser/fix-88176-inspector
Only update inspector if configuration warning change was relevant
2024-02-13 23:43:37 +01:00
Rémi Verschelde 391a8e5327
Merge pull request #85868 from KoBeWi/knowyourtiles
Add descriptions for tile properties
2024-02-13 11:24:42 +01:00
RedMser a53793472e Only update inspector if configuration warning change relevant
Fixes #88176
2024-02-10 20:46:09 +01:00
A Thousand Ships 684752e75b
Replace error checks against `size` with `is_empty` 2024-02-09 12:50:15 +01: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
Danil Alexeev 547f03b6d7
Editor: Fix `_parse_category()` is not called for custom categories 2024-02-03 23:54:32 +03:00
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
kobewi 6e31c413b6 Add descriptions for tile properties 2023-12-07 16:57:34 +01: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