summaryrefslogtreecommitdiffstats
path: root/scene/main/viewport.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix Viewport Texture must be set to use itHilderin2024-11-011-0/+1
| | | | (cherry picked from commit c11107b1fbcb67181f03ec1105953fe4808649fd)
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Add an additional input stage after physics pickingMarkus Sauermann2024-10-171-0/+1
| | | | | | Allow handling events, that were not used during physics picking. (cherry picked from commit godotengine/godot@fbd5d2ba8bbd3c548a67dc3c462e0e0666510228)
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Fix subwindow titlebar redraw on oversampling change.bruvzg2024-06-231-0/+1
|
* Force canvas item update on oversampling change.bruvzg2024-06-031-1/+1
|
* Improvements to VRS/Foveated renderingBastiaan Olij2024-05-031-0/+12
|
* Remove unused variable Viewport::gui.last_mouse_focusMarkus Sauermann2024-05-011-1/+0
| | | | The last use was removed in January 2023
* Overhaul TextEdit selection.kit2024-04-261-0/+1
| | | | The caret is now a part of the selection.
* Add missing `RenderInfoType` enum to `Viewport`A Thousand Ships2024-03-231-0/+1
|
* Organize 2D audio, camera, and physics in ViewportAaron Franke2024-03-101-37/+44
|
* Fix mouse entered notificationsMarkus Sauermann2024-02-291-1/+1
| | | | | | | | | | | 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.
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-1/+1
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Merge pull request #75688 from mnemoli/pickoneRémi Verschelde2024-02-121-0/+3
|\ | | | | | | Add setting for picking only top-most overlapping collision object
| * Add Viewport setting for picking only first-encountered CanvasItem physics ↵mnemoli2024-01-111-0/+3
| | | | | | | | object
* | Update Node::get_configuration_warnings signatureRedMser2024-02-081-1/+1
| |
* | Remove unused Variable `Viewport::gui_input_group`Markus Sauermann2024-01-261-1/+0
| | | | | | | | The gui input group is not needed during the gui input step.
* | Expose a method to get hovered Control in ViewportClaire Blackshaw2023-12-181-0/+1
| |
* | fix crash on hiding grandparent on mouse exitkit2023-12-021-0/+1
| |
* | Make mouse-enter/exit notifications match mouse event propagationkit2023-11-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | `NOTIFICATION_MOUSE_ENTER` and `NOTIFICATION_MOUSE_EXIT` now includes the areas of children control nodes if the mouse filters allow it. In order to check if a Control node itself was entered/exited, the newly introduced `NOTIFICATION_MOUSE_ENTER_SELF` and `NOTIFICATION_MOUSE_EXIT_SELF` can be used. Co-authored-by: Markus Sauermann <6299227+Sauermann@users.noreply.github.com>
* | Revert "Add a Disable 2D property to Viewport"clayjohn2023-10-271-4/+0
| | | | | | | | This reverts commit f6cc2603a17a64f37c1273cdc4c2a058a0c8afc1.
* | Add a Disable 2D property to ViewportHugo Locurcio2023-10-071-0/+4
| | | | | | | | | | | | This is the 2D counterpart to the existing Disable 3D property. Its functionality is already internally implemented and used, but it wasn't exposed.
* | Fix tooltips behaving incorrectly on `Tree` nodesMichael Alexsander2023-09-281-0/+1
| |
* | Add FidelityFX Super Resolution 2.2 (FSR 2.2.1) support.Dario2023-09-251-0/+2
|/ | | | Introduces support for FSR2 as a new upscaler option available from the project settings. Also introduces an specific render list for surfaces that require motion and the ability to derive motion vectors from depth buffer and camera motion.
* Merge pull request #79201 from Rindbee/fix-setup-state-not-clearedRémi Verschelde2023-08-171-0/+2
|\ | | | | | | Clear the previously set state when configuring for a new scene root node
| * Clear the previously set state when configuring for a new scene root nodeRindbee2023-08-081-0/+2
| | | | | | | | | | | | | | Saving a subscene causes the main scene to be re-instantiated. And the resource instance in the main scene will be reused when the main scene is re-instantiated. So for resources with `resource_local_to_scene` enabled, resetting state may be necessary (at least for `ViewportTexture`).
* | Allow to get a list of visible embedded `Window`sMichael Alexsander2023-08-161-0/+1
| |
* | Fix nodes receiving mouse events in black bars of `Window`Markus Sauermann2023-08-091-3/+2
|/ | | | | | | | Previously for InputEvents there was no distinction between Window-area and Viewport-area. This was problematic in cases where stretching was used and the Window contained black bars at the sides of the Viewport. This PR separates the area of Window and Viewport regarding InputEvents.
* Merge pull request #80215 from clayjohn/HDR-2DRémi Verschelde2023-08-081-0/+4
|\ | | | | | | Add option to enable HDR rendering in 2D
| * Add option to enable HDR rendering in 2Dclayjohn2023-08-071-0/+4
| | | | | | | | | | | | | | This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear. This is necessary for proper HDR screen support in the future.
* | Fix various typos with codespellRémi Verschelde2023-08-071-1/+1
|/ | | | | | | | | Also includes typo fixes from #79993, #80068, #80276, and #80303. Co-authored-by: betalars <contact@betalars.de> Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com> Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com> Co-authored-by: Raul Santos <raulsntos@gmail.com>
* Refactor mouse_entered and mouse_exited notificationsMarkus Sauermann2023-08-011-2/+11
| | | | | | | | | | | | | | | | | | The previous implementation for signals mouse_entered and mouse_exited had shortcomings that relate to focused windows and pressed mouse buttons. For example a Control can be hovered by mouse, even if it is occluded by an embedded window. This patch changes the behavior, so that Control and Viewport send their mouse-enter/exit-notifications based solely on mouse position, visible area, and input restrictions and not on which window has focus or which mouse buttons are pressed. This implicitly also changes when the mouse_entered and mouse_exited signals are sent. This functionality can not be implemented as a part of Viewport::_gui_input_event, because of its interplay with Windows and because Viewport::_gui_input_event is based on input and not on visibility.
* Embedded Popups store their safe_rect in their embedderMarkus Sauermann2023-06-201-1/+4
| | | | | Storing it in the DisplayServer didn't make sense in this case, because the embedded window is unknown to the DisplayServer.
* Merge pull request #77209 from Rindbee/ViewportTexture-not-change-RIDRémi Verschelde2023-06-091-0/+1
|\ | | | | | | Don't change `RID` when changing `viewport_path` in `ViewportTexture`
| * Don't change `RID` when changing `viewport_path` in `ViewportTexture`Rindbee2023-06-091-0/+1
| | | | | | | | | | | | When changing `viewport_path`, the `proxy`'s target is changed to a new placeholder. Add a flag `vp_changed` to prevent calling `setup_local_to_scene` (mainly called by toggling `resource_local_to_scene`) when the target viewport has not changed.
* | Merge pull request #78017 from Sauermann/fix-physics-passive-hoveringRémi Verschelde2023-06-091-10/+0
|\ \ | | | | | | | | | Fix passive mouse hovering for physics
| * | Fix passive mouse hovering for physicsMarkus Sauermann2023-06-091-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently mouse hovering doesn't update the state, when collision objects or the camera move. This PR fixes this problem by taking the mouse position from the viewport and not from a nonexistent previous event. Since previous events could potentially be a long time ago, their modifier-key state might be outdated. This PR fetches the current status of modifier-keys from `Input`. These changes allow the removal of some class-variables and making additional simplifications.
* | | Merge pull request #77923 from ↵Rémi Verschelde2023-06-091-0/+2
|\ \ \ | |/ / |/| | | | | | | | | | | Sauermann/fix-mouse-position-with-screen-transform Fix mouse position with screen transform
| * | Fix mouse position with screen transformMarkus Sauermann2023-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a Viewport is not directly attached to the screen, the function `Viewport::get_mouse_position` can't rely on `get_screen_transform`, because that function is ambiguous in these situations. In these cases it is necessary to use the mouse position from the most recent mouse IputEvent.
* | | Fix input handling of unfocusable embedded WindowsMarkus Sauermann2023-06-061-0/+1
|/ / | | | | | | | | InputEvents get in some cases sent to the wrong Window. fix `Viewport::_sub_windows_forward_input`- console error spam
* / Make `Viewport::gui_get_focus_owner` constAaron Franke2023-06-021-1/+1
|/
* Deprecate push_unhandled_inputMarkus Sauermann2023-05-311-0/+4
| | | | | | | | | | | The functionality of `push_unhandled_input` has changed so that it no longer propagates input events to SubViewports. This makes it less predictable and it should be deprecated in favor of `push_input` which provides the same functionality and more. Also this deprecation simplifies the Viewport-API by reducing the methods for pushing input events, so that users don't need to worry about when to use which function in order to insert input events.
* Create a virtual mouse move event after moving child nodesMarkus Sauermann2023-05-291-0/+1
| | | | | This updates mouse cursor and mouse-over-states without the need for additional mouse movements.
* Improve the UX of ViewportTexture in the editorRindbee2023-05-101-0/+2
| | | | | | | | | | The associated `ViewportTexture`s will update the `viewport_path` in time when the `Viewport`'s nodepath is changed (caused by renaming the node names or moving in the SceneTree dock). If the target `Viewport` is changed by resetting the `viewport_path`, the `ViewportTexture`s will be re-setup and emit `changed` signal in time.
* Merge pull request #75751 from ↵Rémi Verschelde2023-05-081-0/+3
|\ | | | | | | | | | | KoBeWi/eradicate_ViewportTexture_errors_entirely_and_surely Prevent errors when using ViewportTexture
| * Prevent errors when using ViewportTexturekobewi2023-05-081-0/+3
| |
* | Merge pull request #57179 from spacechase0/notify-world2d-changed-masterRémi Verschelde2023-05-081-0/+2
|\ \ | |/ |/| | | Propagate previously unused NOTIFICATION_WORLD_2D_CHANGED, make CanvasItem/CollisionObject2D use it
| * Propogate previously unused NOTIFICATION_WORLD_2D_CHANGED, make ↵Chase Warrington2023-05-011-0/+2
| | | | | | | | CanvasItem/CollisionObject2D use it
* | Remove NOTIFICATION_MOVED_IN_PARENTJuan Linietsky2023-04-061-0/+5
|/ | | | | | | | | * 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.
* Fix some ways to create inconsistent Viewport sizesMarkus Sauermann2023-02-131-0/+1
| | | | | | | | In the editor, it was possible to set the size of a `SubViewport` even in cases where a parent `SubViewportContainer` had stretch enabled. This PR disables editing a `SubViewport.size` while the parent disallows it and it makes necessary adjustments during `NOTIFICATION_ENTER_TREE`.