Commit graph

2155 commits

Author SHA1 Message Date
Ainsley
915e39b3c9 Use _camera_3d_set instead of change camera_3d directly 2024-06-20 17:21:38 +08:00
Rémi Verschelde
0ec023f101
Merge pull request #92678 from warriormaster12/dup_prop_before_remap_resources
Duplicate properties first before remapping resources
2024-06-18 14:08:39 +02:00
bruvzg
18393eb09a
[Window] Ignore duplicate mouse enter events. 2024-06-12 22:37:28 +03:00
Rémi Verschelde
5bab95a556
Merge pull request #92827 from raulsntos/core/node-to_string
Use GDExtension `to_string` in Node
2024-06-12 10:00:29 +02:00
Raul Santos
29bf60cc02
Use GDExtension to_string in Node
Matches the `Object::to_string` implementation.
2024-06-11 17:40:51 +02:00
bruvzg
768fd1eacb
[Window] Fix mouse hover state of the main window when mouse enter event was sent before setting callbacks. 2024-06-10 18:43:01 +03:00
Rémi Verschelde
b7ea8415c2
Merge pull request #91997 from aaronp64/tooltip_transforms
Fix tooltip mouse position conversion for scaled controls
2024-06-10 16:11:39 +02:00
bruvzg
864a93fdbf
Fix excessive canvas items updates. 2024-06-05 21:01:30 +03:00
bruvzg
9fb9660912
Force canvas item update on oversampling change. 2024-06-03 19:46:49 +03:00
warriormaster12
e4d0d1344b Duplicate properties first before remapping resources 2024-06-02 13:27:35 +03:00
bruvzg
5c433cf693
Update editor Window preview position when resizing window. 2024-05-31 07:52:46 +03:00
Rémi Verschelde
c9f249796d
Merge pull request #92317 from bruvzg/emb_decorations
Fix `get_position_with_decorations` and `get_size_with_decorations` for embedded windows.
2024-05-30 11:48:02 +02:00
Rémi Verschelde
62f134bd7e
Merge pull request #91724 from KoBeWi/regional_textures
Add support for AtlasTexture in `draw_polygon()`
2024-05-30 11:47:47 +02:00
bruvzg
19839d9553
Fix Window position preview in the editor. 2024-05-29 11:56:06 +03:00
Adriano Orioli
edd2e6e37f
make InstancePlaceholder in charge of node reference resolution 2024-05-28 11:51:49 +02:00
bruvzg
64d789aba7
Fix get_position_with_decorations and get_size_with_decorations for embedded windows. 2024-05-24 20:10:36 +03:00
aaronp64
aa07828503 Fix tooltip mouse position conversion for scaled controls
Viewport used get_global_transform().xform_inv(mpos) to convert the mouse position to the control's local coordinates when getting the control's tooltip, which does not handle scale correctly.  This impacted tooltips for any controls that depended on the position to determine what tooltip to show, including RichTextLabel, ItemList, Tree, and probably some others.  This change is for Viewport to use get_global_transform_with_canvas().affine_inverse().xform(mpos) for tooltips instead, to match what we do for Viewport::_gui_call_input.

Fixes #91984
2024-05-15 17:28:58 -04:00
kobewi
59f05ed31a Cleanup unused/underused singleton StringNames 2024-05-14 18:18:29 +02: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
Yaohua Xiong
ed3d311687 Add antialias support for CanvasItem draw primitives
including
- rect, circle; both filled and unfilled.
- polyline, multiline
2024-05-13 19:03:31 +08:00
A Thousand Ships
2f442ff21a
Fix outdated name for script StringName 2024-05-13 12:39:41 +02:00
Rémi Verschelde
3bb7fd8ac4
Merge pull request #91329 from warriormaster12/dont-do-things-twice
Fix a performance regression when duplicating a node
2024-05-13 12:05:34 +02:00
warriormaster12
f14455fd3d Fix a performance regression when duplicating a node 2024-05-12 21:43:22 +03:00
kobewi
a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
kobewi
47aefbb415 Add support for AtlasTexture in draw_polygon() 2024-05-08 19:10:53 +02:00
A Thousand Ships
b4c6cc7d82
[Core] Add case-insensitive String::containsn 2024-05-08 12:48:01 +02:00
kobewi
5c0f7968e3 Fix crash when adding a child while duplicating a node 2024-05-07 21:56:38 +02:00
Rémi Verschelde
e63252b421
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
2024-05-07 09:04:44 +02:00
A Thousand Ships
86de59d60a
[Core] Add LocalVector::has for convenience 2024-05-06 18:03:37 +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
Bastiaan Olij
9042ddf19f Improvements to VRS/Foveated rendering 2024-05-03 17:20:30 +10:00
bruvzg
e5205e589f
[StatusIndicator] Add method to get indicator icon screen rect. 2024-05-02 14:39:33 +03:00
Rémi Verschelde
b2af040423
Merge pull request #91425 from Sauermann/fix-force-drag-focus-crash
Make `mouse_focus` and `mouse_focus_mask` consistent for force_drag
2024-05-02 12:46:45 +02:00
Rémi Verschelde
0b6c29f2d2
Merge pull request #89114 from AThousandShips/vec_elem_scalar
[Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`
2024-05-02 12:46:22 +02:00
Yaohua Xiong
1f2aa17d14
Extend CanvasItem::draw_circle() with filled, width, and antialiased options
Make it possible to draw unfilled circle, like draw_rect(). Antialising is only implemented for unfilled version.
2024-05-02 10:42:24 +02:00
A Thousand Ships
308dbb8c63
[Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
Markus Sauermann
30a19a5c2f Make mouse_focus and mouse_focus_mask consistent for force_drag
In `Viewport::_gui_force_drag` currently `Viewport::gui.mouse_focus`
gets cleared, but `Viewport::gui.mouse_focus_mask` doesn't get cleared.

This is an inconsistency which can cause a crash.

With the change of this PR, `mouse_focus_mask` also gets cleared.
This is in alignment with how regular drag and drop clears both variables.
2024-05-02 00:10:29 +02:00
Markus Sauermann
792b38813f Remove unused variable Viewport::gui.last_mouse_focus
The last use was removed in January 2023
2024-05-01 11:20:40 +02:00
Rémi Verschelde
70247adf25
Merge pull request #89734 from BastiaanOlij/openxr_reorder_wait_frame
OpenXR: Change timing of xrWaitFrame and fix XR multithreading issues
2024-05-01 09:54:51 +02:00
Rémi Verschelde
85062e37ef
Merge pull request #89588 from bruvzg/status_ind_menu_direct
[StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly.
2024-05-01 09:54:44 +02:00
Bastiaan Olij
cbab7dc049 OpenXR: Change timing of xrWaitFrame and add thread safety features to OpenXR 2024-05-01 14:24:41 +10:00
Rémi Verschelde
ca38212604
Merge pull request #89643 from mnemoli/pickone-fix-89641
Fix mouse events when `physics_object_picking_first_only` enabled
2024-04-30 17:03:10 +02:00
kit
154f727c7a Overhaul TextEdit selection.
The caret is now a part of the selection.
2024-04-26 14:24:10 -04:00
Rémi Verschelde
bd598d5657
Merge pull request #85678 from KoBeWi/editor_walktime
Add separate feature tags for editor runtime
2024-04-26 15:13:16 +02:00
kobewi
3ebb5b84a0 Add separate feature tags for editor runtime 2024-04-26 14:44:38 +02:00
kobewi
0b877a9962 Expose is_part_of_edited_scene() 2024-04-26 11:49:38 +02:00
Rémi Verschelde
3a88373a4c
Merge pull request #86553 from Koyper/fix_popup_panel_content_scaling
Fix non-embedded tooltips, popups and dialogs resizing to match Viewport content scale factors != 1.0
2024-04-18 12:24:11 +02:00
Koyper
0881c81c13 Fix non-embedded Windows resizing to match Viewport content scale factor 2024-04-17 09:30:16 -05:00
Haoyu Qiu
8d1cb7e74c Add project setting for root node auto translate mode 2024-04-16 11:02:04 +08:00