Commit graph

1722 commits

Author SHA1 Message Date
Rémi Verschelde
72323a57d0
Merge pull request #57894 from Sauermann/fix-subviewport-1
Fix unrestricted mouse-event propagation to SubViewports for Physics-Picking
2023-05-09 10:43:49 +02:00
Rémi Verschelde
15f9ac9458
Merge pull request #75751 from KoBeWi/eradicate_ViewportTexture_errors_entirely_and_surely
Prevent errors when using ViewportTexture
2023-05-08 16:40:10 +02:00
Rémi Verschelde
bbe05b60c8
Merge pull request #57179 from spacechase0/notify-world2d-changed-master
Propagate previously unused NOTIFICATION_WORLD_2D_CHANGED, make CanvasItem/CollisionObject2D use it
2023-05-08 16:40:00 +02:00
kobewi
1b9802fa8c Prevent errors when using ViewportTexture 2023-05-08 15:56:16 +02:00
Michael Alexsander
8118d0d2f5 Add more uses of appropriate cursors when resizing/moving some UI nodes 2023-05-07 11:14:57 -03:00
Max Hilbrunner
fa451ead91
Merge pull request #74883 from dalexeev/fix-thin-multiline-colors 2023-05-05 14:26:37 +02:00
Chase Warrington
46e06ee1e6 Propogate previously unused NOTIFICATION_WORLD_2D_CHANGED, make CanvasItem/CollisionObject2D use it 2023-05-01 18:26:55 -04:00
Samuele Panzeri
4aaa2e6477 Fix wait for thread not started 2023-04-27 20:28:22 +02:00
Rémi Verschelde
6aac8af6f1
Merge pull request #69318 from Sauermann/fix-refresh-gui-events
Fix scene reload crash related to mouse cursor update
2023-04-25 15:36:26 +02:00
Aaron Franke
290b09b36c
Expose determinant in Transform2D, rename internal method 2023-04-22 13:44:14 -05:00
Rémi Verschelde
3695dfb357
Merge pull request #75509 from KoBeWi/In_physics,_the_observer_effect_is_the_disturbance_of_an_observed_system_by_the_act_of_observation._A_common_example_is_checking_CanvasItem's_global_position,_which_causes_its_transform_to_be_re-calculated-
Fix invalid global position when read outside tree
2023-04-19 10:13:48 +02:00
bruvzg
520a8d8ed2
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method. 2023-04-19 08:54:53 +03:00
kobewi
727a4ed79a Fix invalid global position when read outside tree 2023-04-18 22:14:01 +02:00
Yuri Sizov
377d8845da
Merge pull request #75890 from YuriSizov/gui-remember-window-state
Always cache parent visibility in `CanvasItem`
2023-04-18 13:07:41 +02:00
Chris Hutchinson
97712b3f50 Clamp minimum value of time_left to 0.0 2023-04-17 16:49:04 +02:00
Yuri Sizov
b8b494a16c
Merge pull request #68397 from aaronfranke/get-child
Make `Node::get_children()` public
2023-04-17 14:28:37 +02:00
angel-721
e347d7d64d Rename internal root canvas group to start with underscore 2023-04-16 17:42:21 -06:00
Aaron Franke
8eb9986dc5
Make Node::get_children() public 2023-04-15 21:59:25 -05:00
Rémi Verschelde
347a8e20ae
Merge pull request #69324 from RedMser/advanced-settings-errors
Make it easier to solve warnings/errors referring to project settings
2023-04-11 19:39:53 +02:00
Yuri Sizov
c48219f51e
Merge pull request #73658 from smix8/do_not_stop_the_entire_server_cause_you_want_to_pause_4x
Keep NavigationServer active while SceneTree is paused
2023-04-10 16:24:26 +02:00
Yuri Sizov
fd6a743823 Always cache parent visibility in CanvasItem 2023-04-10 16:18:46 +02:00
smix8
4b0dee080e Keep NavigationServer active while SceneTree is paused
Keep NavigationServer active while SceneTree is paused.
2023-04-10 15:30:22 +02:00
Juan Linietsky
ab5fc22f67 Optimize Node children management
* Adding and removing child nodes is now constant time, speed up should be huge.
* Searching for node paths as in ("path/to/node") should be far faster too.

This changes the children management and makes it a hashmap, optimizing most StringName based operations.
Most operations should be severe speed up without breaking compatibility.

This should fix many issues regarding to node access performance, and may also speed up editor start/end, but benchmarks are needed. So if you want to test, please make some benchmarks!

Further performance improvements will be done in the future by removing NOTIFICATION_MOVED_IN_PARENT and replacing by something less laborious.
2023-04-08 10:54:28 +02:00
Rémi Verschelde
c151d3231f
Merge pull request #75760 from reduz/optimize-node-add-child-validation
Optimize Node::add_child validation
2023-04-07 18:20:28 +02:00
Juan Linietsky
223ce4fcb9 Optimize Node::add_child validation
Adding 10k nodes is almost twice as fast.
2023-04-07 13:18:47 +02:00
Samuele Panzeri
404f24b5c4 Update sibling indices after a node is removed.
With change 104392e the code to update node indices on removal was erronously removed.
The out of date indices would cause crashes while selecting nodes in a graph editor (e.g. animation tree) and selected nodes are oftern pushed to beginning or end of the child list for the parent.
2023-04-06 20:47:57 +02:00
Juan Linietsky
104392ef4e Remove NOTIFICATION_MOVED_IN_PARENT
* This notification makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILDREN_CHANGED (and children_changed signal).
* Changed Canvas code (and similar) to use the above signal, to perform more efficiently.

This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
It is required for the changes in #75627 to be entirely effective.
2023-04-06 13:57:13 +02:00
Yuri Sizov
91ff34b5b5 Add a warning when trying to access theme items too early 2023-04-03 18:01:10 +02:00
Rémi Verschelde
b85fc4aa6d
Merge pull request #73646 from KoBeWi/squish
Prevent off-screen controls in editor
2023-04-03 17:07:54 +02:00
RedworkDE
aa604c5c47 Do not clamp non-embedded window size to embedder 2023-03-29 22:35:07 +02:00
Yuri Sizov
f818d2b98f
Merge pull request #75141 from rcorre/rrc/dialog-pos 2023-03-28 10:54:37 +02:00
Haoyu Qiu
5a5fd33e42 More i18n improvements
* Make placeholder in editor layout dialog translatable.
* Make messages in scene import settings dialog translatable.
* Mark theme override property categories for translation.
2023-03-27 22:24:01 +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
Yuri Sizov
c95b88cbe9
Merge pull request #75238 from kleonc/canvas-item-fix-notifications-order-on-enter-tree
`CanvasItem` Fix `ENTER_CANVAS` / `VISIBILITY_CHANGED` notifications order when entering tree
2023-03-27 13:00:41 +02:00
RedMser
ed960453b7 Make solving project setting errors easier
Show full project setting path in error messages.
Force filtering for advanced settings if filter is not empty.
2023-03-27 08:10:35 +02:00
kobewi
8f8178bda6 Fix auto-translations in editor 2023-03-22 23:57:12 +01:00
kleonc
6e3820fd4d CanvasItem Fix ENTER_CANVAS / VISIBILITY_CHANGED notifications order when entering tree 2023-03-22 20:01:22 +01:00
David Snopek
4d13be3c5e Add missing documentation for MultiplayerPeerExtension 2023-03-20 08:08:59 -07:00
Markus Sauermann
8836f2160a Move call of push_unhandled_input from Window to Viewport
This solves the problem, that mouse events get sent to SubViewports
even if they are outside of the visible area of the SubViewport.

This changes makes SubViewportContainer::unhandled_input redundand.
Shortcut Events now need to be distributed via push_input, in order for
them to be able to reach SubViewports.
2023-03-17 19:22:24 +01:00
Danil Alexeev
ba985ecf3f
Fix draw_multiline_colors() for width < 0 2023-03-14 09:43:56 +03:00
Yuri Sizov
81e2b020ba Prevent infinite loops when printing orphan nodes 2023-03-09 16:47:38 +01:00
Rémi Verschelde
0ef3d1bf56
Merge pull request #73188 from Sauermann/fix-inconsistent-viewport-size
Fix some ways to create inconsistent Viewport size states
2023-03-07 12:04:00 +01:00
Rémi Verschelde
0b98b470cc
Merge pull request #73716 from bruvzg/improve_locale_selection
Improve layout direction/locale automatic selection.
2023-03-06 10:57:56 +01:00
Rémi Verschelde
0885e4b931
Merge pull request #73365 from bruvzg/no_transient_children
Automatically reparent editor message dialogs to avoid error spam.
2023-03-02 11:41:17 +01:00
Fabio Alessandrelli
f9bcaccc11 [MP] Fix orphan StringName on close.
Use a static StringName for the registered default interface name.
2023-02-27 09:45:16 +01:00
bruvzg
82d7923c65
Improve layout direction/locale automatic selection. 2023-02-22 08:37:14 +02:00
bruvzg
921f3b7589
Automatically reparent editor message dialogs to avoid error spam. 2023-02-21 12:32:11 +02:00
kobewi
55b50703d7 Prevent off-screen controls in editor 2023-02-20 20:25:39 +01:00
bruvzg
7246b229e1
Set RTL minimal dash size to 2.0, add invalid dash size error to the draw_dashed_line. 2023-02-17 08:53:08 +02:00
Rémi Verschelde
b90d70d592
Merge pull request #72764 from Sauermann/fix-color-picking
Fix Color Picking
2023-02-17 00:33:20 +01:00