Commit graph

327 commits

Author SHA1 Message Date
Pāvels Nadtočajevs
cdcb208eb9
[Viewport] Add option to inherit parents texture filter/repeat, use it for popups. 2026-03-11 15:06:47 +02:00
Rémi Verschelde
8c0f175c94
Decouple RenderingServer from as much of the codebase as possible
Notably decouples it from:
- AccessibilityServer
- DisplayServer
- Viewport
- Window
2026-03-03 12:48:07 +01:00
Rémi Verschelde
a447ac95ec
Move DisplayServer enums and typedefs to DisplayServerEnums
This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
2026-03-03 12:44:02 +01:00
Bastiaan Olij
f3a815238b Add view count support to Viewport 2026-02-26 12:37:21 +11:00
Rémi Verschelde
1c12d2c36e
Tidy up includes in scene/main and scene/debugger 2026-02-19 15:09:29 +01:00
Adam Scott
263589497b
Add non-public {Line,Text}Edit::_set_text()
- [Web] Fix "Enter" not triggering LineEdit submits.

Co-authored-by: Marwen Azouzi <marwen.azouzi@datadoghq.com>
2026-01-01 12:00:52 +01:00
Rémi Verschelde
43f966772d
Merge pull request #112712 from bruvzg/mo_e
Use event position for mouse over when event come from the same window.
2025-12-18 14:23:48 +01:00
David Snopek
308f23f21d Synchronize the names for RequiredParam<T> arguments in header files 2025-12-03 04:14:52 -06:00
David Snopek
fc92ce3e7f Use RequiredParam/RequiredResult in some high value places 2025-12-02 10:44:12 -06:00
Pāvels Nadtočajevs
179d1b763b
Use safe ObjectID for mouse over controls. 2025-11-18 20:18:12 +02:00
Pāvels Nadtočajevs
a6f6d7118e
Use event position for mouse over when event come from the same window. 2025-11-13 08:26:11 +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