1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-06 17:25:19 +00:00
Commit Graph

317 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs
179d1b763b Use safe ObjectID for mouse over controls. 2025-11-18 20:18:12 +02:00
hannes
89aa5137b8 add gui_drag_threshold for viewports 2025-10-24 19:01:25 +02:00
Thaddeus Crews
79e533679c Merge pull request #111620 from Ivorforce/node-no-display-server
Remove `display_server.h` transitive include from `node.h`.
2025-10-14 10:31:25 -05:00
Thaddeus Crews
d3285f5468 Merge pull request #111185 from WhalesState/vp-disable-xr
More XR disable for Viewport and export.
2025-10-13 19:28:56 -05:00
Lukas Tenbrink
1e0b41ab27 Remove display_server.h transitive include from node.h. 2025-10-14 00:43:02 +02:00
Mounir Tohami
9894256e3a More XR disable for Viewport and export. 2025-10-06 20:15:07 +03:00
HolonProduction
7f77565b66 Remove unused members from Viewport 2025-10-05 22:41:16 +02:00
Aaron Franke
e2dd60b5f8 Group together 2D camera override functions 2025-10-02 13:21:44 -07:00
Thaddeus Crews
d86123870b Merge pull request #52285 from rxlecky/camera-override-cleanup
Clean up and simplify camera override API
2025-09-30 18:35:11 -05:00
Michael Alexsander
aeb3a45c97 Hide Control focus when given via mouse input 2025-09-19 13:43:29 -03:00
rxlecky
02e1919514 Cleanup and simplify camera override API
- Harmonise the camera override 2D and 3D APIs
- Switch to using Camera2D/3D nodes to provide override functionality. This makes for simpler code, gets rid of much of copy-pasted camera code and makes code that relies on current viewport camera such as VisibleOnScreenNotifiers and object picking work out of the box.
- Make camera override code only accesible within DEBUG_ENABLED builds
2025-08-31 15:34:46 +02:00
Pāvels Nadtočajevs
34a97f9c9b Fix scale and position of popups with force_native. 2025-06-16 13:03:42 +03:00
Raymond DiDonato
6b99608950 Add SMAA 1x 2025-05-21 15:02:09 -04:00
Thaddeus Crews
5538850d87 Core: Convert Pair/KeyValue to constexpr 2025-05-15 10:37:41 -05:00
kobewi
34b485d62b Remove empty constructors and destructors from scene/ 2025-05-06 14:46:54 +02:00
Pāvels Nadtočajevs
4afeca3bcf Replace global oversampling with overrideable per-viewport oversampling. 2025-04-14 13:43:09 +03:00
Thaddeus Crews
0d267e7b1e Core: Add dedicated BitField template 2025-04-11 11:53:26 -05:00
Pāvels Nadtočajevs
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
Michael Alexsander
5ad414d046 Allow to compile templates without physics servers 2025-03-28 11:00:44 -03:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
KerekesDavid
315cc5e437 Fix wrong viewport scaling at intermediate resolutions
Fixes viewport scale being wrong at resolutions that are not
integer multiples of content_scale_factor.

This is done by allowing size_2d_override to be Size2 instead of
Size2i. This change is not propagated to the exposed SubViewport
to keep compatibility for now.
2025-02-21 11:24:38 +01:00
Thaddeus Crews
654b5993e2 Merge pull request #99890 from Sauermann/fix-vp-mouse-notifications
Introduce `Viewport` functions for keeping the mouse over state consistent
2025-02-03 11:14:42 -06:00
Pāvels Nadtočajevs
8d911b2554 [Window] Expose start_drag and start_resize methods (for both native and embedded windows). 2025-01-07 23:35:14 +02:00
Stuart Carnie
11dc4f2e5e Metal: Add MetalFX upscaling support
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-01-06 06:03:18 -07:00
Thaddeus Crews
cbfc34d279 Merge pull request #100444 from Sauermann/fix-view-panner-mouse-warp
Fix `ViewPanner` panning-mouse-warp
2024-12-19 20:00:01 -06:00
Markus Sauermann
4887172a59 Fix ViewPanner panning mouse warp
Currently the mouse cursor jumps in unexpected ways, when a `ViewPanner`
is used in SubViewports or embedded Windows.

This is caused by providing wrong coordinate systems to
Input::warp_mouse_motion.

This PR replaces the use of `Input::warp_mouse_motion` with
`Viewport::wrap_mouse_in_rect` and makes sure, that the correct
coordinate systems are used.

This change makes it necessary, that all classes, that currently
use ViewPanner, need to provide the correct Viewport to ViewPanner.
2024-12-20 00:28:49 +01:00
Rémi Verschelde
d60c0e21a6 Merge pull request #88313 from wagnerfs/run-time-anisotropic-filtering
Allow changing the anisotropic filter level at run-time per Viewport
2024-12-17 16:18:38 +01:00
Rémi Verschelde
26fec37389 Merge pull request #99942 from kitbdev/fix-invisible-subviewport-editor
Fix selecting and editing invisble items in SubViewports
2024-12-12 14:10:09 +01:00
kit
93e06ff16c Fix select and edit invisble items in SubViewports 2024-12-02 17:12:51 -05:00
rune-scape
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
Markus Sauermann
8e00035f08 Introduce Viewport functions for keeping the mouse over state consistent 2024-12-01 11:22:11 +01:00
Wagner
6995b6a03e Allow changing the anisotropic filter level at run-time per Viewport 2024-11-30 00:50:45 -03:00
Thaddeus Crews
9c300a6c05 Merge pull request #80965 from Calinou/viewport-add-get-stretch-scale-factor
Add a Viewport method to get automatically computed 2D stretch transform
2024-11-27 10:47:12 -06:00
Hugo Locurcio
0cf99cf95d Add a Viewport method to get automatically computed 2D stretch transform
`Viewport.get_stretch_transform()` returns the automatically computed
2D stretch transform. Combined with `Transform2D.get_scale()`, this is
useful when using the `canvas_items` stretch mode in a project.

There are many situations where knowing this factor is useful:

- Divide Camera2D zoom to keep the size of the 2D game world identical
  regardless of the 2D scale factor (so that UI elements can still be scaled).
- Make certain controls always drawn at 1:1 scale
  (e.g. for the crosshair in a FPS). This is done by dividing the Control
  node's scale by the scale factor.
2024-11-19 23:11:13 +01:00
Michael Alexsander
16524a8a01 Add "Game" editor for better runtime debugging 2024-10-30 11:42:17 -03:00
Rémi Verschelde
2a8d30aa9f Merge pull request #97029 from Hilderin/fix-viewport-texture-must-be-set-to-use-it
Fix Viewport Texture must be set to use it
2024-09-18 11:15:39 +02:00
Hilderin
c11107b1fb Fix Viewport Texture must be set to use it 2024-09-17 18:18:07 -04:00
Rémi Verschelde
391849d232 Merge pull request #96867 from L2750558108/remove-gui-key-event-accepted-shit
Remove useless `Viewport::gui.key_input_accepted`
2024-09-16 13:35:13 +02:00
Markus Sauermann
60aaa017ff Enable Drag and Drop for SubViewports and Windows
Make Drag and Drop an application-wide operation.
This allows do drop on Controls in other Viewports/Windows.

In order to achieve this, `Viewport::_update_mouse_over` is adjusted to
remember the Control, that the mouse is over (possibly within nested
viewports). This Control is used as a basis for the Drop-operation, which
replaces the previous algorithm, which was only aware of the topmost
Viewport.

Also now all nodes in the SceneTree are notified about the Drag and Drop
operation, with the exception of SubViewports that are not children of
SubViewportContainers.
2024-09-15 01:06:02 +02:00
2750558108
ccc6e5d25f Remove Useless Viewport::gui.key_input_accepted 2024-09-13 20:52:05 +08:00
kit
307e40e873 Clean up Viewport forced_mouse_focus 2024-08-21 09:37:44 -04:00
bruvzg
c689823c60 Fix subwindow titlebar redraw on oversampling change. 2024-06-23 00:01:56 +03:00
bruvzg
9fb9660912 Force canvas item update on oversampling change. 2024-06-03 19:46:49 +03:00
Bastiaan Olij
9042ddf19f Improvements to VRS/Foveated rendering 2024-05-03 17:20:30 +10: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
kit
154f727c7a Overhaul TextEdit selection.
The caret is now a part of the selection.
2024-04-26 14:24:10 -04:00
A Thousand Ships
8a88e5ea07 Add missing RenderInfoType enum to Viewport 2024-03-23 14:03:08 +01:00
Aaron Franke
c1e9842afb Organize 2D audio, camera, and physics in Viewport 2024-03-10 13:10:13 -07:00
Markus Sauermann
d259f979f5 Fix mouse entered notifications
Make sure, that a windows initial state is `mouse_in_viewport = false`.
This makes sure, that the mouse entered notification is sent when the
mouse hovers a window for the first time.

For embedded Windows, `NOTIFICATION_WM_MOUSE_ENTER` is currently sent
twice in a row. Remove one of the places where it is sent.
`Window::_update_mouse_over()` is the correct one, because there it is
also called for native windows.
2024-02-29 00:57:31 +01:00
Rémi Verschelde
21f0529aa9 Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa4.
2024-02-17 19:03:21 +01:00