Commit Graph

343 Commits

Author SHA1 Message Date
Haoyu Qiu 5d7e003b29
Prepare for moving editor and classref translations to godot-editor-l10n repo
- Separate editor interface and property translations.
- Add property translation in TranslationServer.
- The split and merge of the POT/PO/Makefiles and extract scripts is done
  directly in godot-editor-l10n, the files will be removed in the next commit.
- Remove the hardcoded "to_include" lists from the SCsub, we'll only commit the
  files which are ready to inclue.
2023-02-07 14:20:40 +01:00
Raul Santos c7f4ca36a4
Use `PropertyUsageFlags` enum in parse_property 2023-01-31 23:31:15 +01:00
Rémi Verschelde fd66a86d72
Merge pull request #71330 from Geometror/richtextlabel-fit-content
[RichTextLabel] Match minimum size calculation of Label (proper content fitting)
2023-01-25 09:16:38 +01:00
Rémi Verschelde bda87300e8
Merge pull request #71770 from KoBeWi/better_editing_or_something
Rework EditorPlugin editing logic
2023-01-22 11:07:39 +01:00
kobewi 4ae168eb04 Rework EditorPlugin editing logic 2023-01-22 00:20:45 +01:00
kobewi 615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01: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
Rémi Verschelde 787179dac8
Merge pull request #70148 from KoBeWi/remove_all_restrictions
Remove conditons for unfolding inspector sections
2023-01-13 18:00:45 +01:00
Hendrik Brucker e59d6b1b8c [RichTextLabel] Match minimum size calculation of Label
(optional via fit_content property)
2023-01-13 15:17:26 +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
Juan Linietsky 2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +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
Silc Renew 724f2422d7 Revert "Merge pull request #70696 from Rindbee/propagate-keying-state"
This reverts commit c774b4ce17, reversing
changes made to ccc609d824.
2023-01-04 20:03:28 +09:00
Silc Renew eee9e3cd9a Revert "Merge pull request #68498 from Rindbee/improve-update_tree"
This reverts commit d5dc70a478, reversing
changes made to ccbefa1f43.
2023-01-04 19:15:20 +09:00
Rindbee ef2c3398e6 Propagate the keying state in the inspector
Toggling the keying state does not significantly change the structure
of the inspector. So it's ok to propagate the keying state and then
use `queue_redraw()` to update the keying icon.
2022-12-31 20:29:09 +08:00
Rémi Verschelde c547c4ef59
Revert "Queue inspector tree update when changing the theme."
This reverts commit c0baec410b.

See comments in #70381.
2022-12-22 16:39:21 +01:00
Rémi Verschelde 224d26fb49
Merge pull request #70261 from Maran23/4-x-editor-inspector-section-click
EditorInspectorSection is not (un)folded when clicking under the font
2022-12-21 18:27:27 +01:00
Marius Hanl c0baec410b Queue inspector tree update when changing the theme. 2022-12-21 01:52:24 +01:00
Marius Hanl 51de7b773c EditorInspectorSection is not folded when clicking under the font 2022-12-18 15:37:08 +01:00
Rindbee f352c30ad5 Defer `EditorInspector::update_tree` to the process stage to improve performance
`EditorInspector::update_tree` is expensive, so defer the call to the process phase
to prevent multiple calls in a single frame (when switching scene tabs).
2022-12-17 08:39:59 +08:00
kobewi b28b7936db Remove conditons for unfolding inspector sections 2022-12-16 15:14:50 +01:00
Rémi Verschelde 447f6998b1
Merge pull request #67814 from opl-/fix/editor-inspector-accept-event
Fix editor inspector classes not accepting events
2022-11-29 16:48:03 +01:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
BrunoSXS a5e9878ef8 Fix for documentation not appearing in preview in editor inspector 2022-11-23 22:12:12 -03:00
kobewi 15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
Rémi Verschelde 5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Danil Alexeev 7d15bb4064
Fix `EditorInspector.property_changed` signal connection 2022-10-31 11:52:52 +01:00
opl- 5d7a9f8a5c Fix editor inspector classes not accepting events 2022-10-23 19:03:47 +02:00
kobewi d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
VolTer cb310a229b Rename Copy Property –> Copy Value 2022-09-30 16:44:27 +02:00
Rémi Verschelde 166df0896c Fix typos with codespell
Using codespell 2.3-dev from current git.

And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
Rindbee e9465825cd Fix EditorInspectorCategory minimum size calculation
Calculated using the same theme property values as in `NOTIFICATION_DRAW`, keeping the width at `0` and calculating only the height.
2022-09-21 19:56:19 +08:00
Rémi Verschelde 82961dda3d Merge pull request #66108 from Zylann/editor_inspector_get_selected_path
Expose `EditorInspector.get_selected_path`
2022-09-19 22:01:32 +02:00
Marc Gilleron cee8bd9e76 Expose `EditorInspector.get_selected_path` 2022-09-19 15:20:34 +01:00
Marc Gilleron 056a418862 Expose `EditorProperty._set_read_only` virtual method 2022-09-19 11:56:49 +01:00
Rémi Verschelde 3546add9b3 Merge pull request #60786 from Rindbee/update-editor-property-status
Update checked based on the variant type of the value
2022-09-16 09:24:10 +02:00
Rémi Verschelde 37146763b1 Merge pull request #65868 from timothyqiu/metadata-crash
Fix crash open opening Add Metadata dialog
2022-09-16 09:24:02 +02:00
Haoyu Qiu 372e4cfd49 Fix crash open opening Add Metadata dialog 2022-09-16 11:28:09 +08:00
Michael Alexsander 2f016c521f Fix empty text in the add button when editing nodes with items 2022-09-15 22:01:52 -03:00
Rindbee 9066d55763 Update checked based on the variant type of the value
In `EditorProperty::update_revert_and_pin_status`, if `checkable` is `true`, update `checked` based on the variant type of the value, and rename the function as `EditorProperty::update_editor_property_status`.

**Known problems:**
1. Unable to check Checkbox for properties of type `Object` when it is unchecked. This is probably because during value store/fetch, the `nullptr` (variant type is `Variant::OBJECT`) eventually becomes `Variant()` (variant type is `Variant::NIL`).
2. For theme overrides, click the revert icon will uncheck the Checkbox. This is probably because `EditorPropertyRevert::get_property_revert_value` returns `Variant()`.
2022-09-16 07:22:50 +08:00
Rémi Verschelde 89840b75c9 Merge pull request #65430 from SaracenOne/read_only_array
Add read-only mode to inspector array and dictionary viewer.
2022-09-14 17:43:49 +02:00
Michael Alexsander c4c9e41073 Make `Vector2i` values paired with `EDSCALE` be just `Vector2` 2022-09-08 14:46:32 -03: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
Rémi Verschelde 2b6e043491 Merge pull request #58617 from KoBeWi/custom_something
Improve handling of custom types
2022-09-07 17:54:17 +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