summaryrefslogtreecommitdiffstats
path: root/scene/main/viewport.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@af77100e394dcaca609b15bef815ed17475e51edSpartan3222024-10-151-5/+5
|\
| * Allow `Control` to show custom tooltip when tooltip text is emptyHaoyu Qiu2024-10-081-5/+5
| | | | | | | | Co-Authored-By: bruvzg <7645683+bruvzg@users.noreply.github.com>
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* Add auto translate mode for tooltipsHaoyu Qiu2024-09-261-1/+2
|
* Expose Viewport::get_audio_listener_2d and Viewport::get_audio_listener_3d ↵Lisandro Lorea2024-09-191-0/+2
| | | | | | | | | | | | to scripting Document exposed methods Apply suggestions from code review Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com> Document default behavior when no audio listeners are active
* Merge pull request #97029 from ↵Rémi Verschelde2024-09-181-12/+13
|\ | | | | | | | | | | Hilderin/fix-viewport-texture-must-be-set-to-use-it Fix Viewport Texture must be set to use it
| * Fix Viewport Texture must be set to use itHilderin2024-09-171-12/+13
| |
* | Merge pull request #97070 from KoBeWi/snaming_ur_inputsRémi Verschelde2024-09-161-14/+14
|\ \ | | | | | | | | | Use `SNAME` for `ui` actions in Viewport
| * | Use SNAME for ui actions in Viewportkobewi2024-09-161-14/+14
| |/
* | Merge pull request #96867 from L2750558108/remove-gui-key-event-accepted-shitRémi Verschelde2024-09-161-47/+14
|\ \ | | | | | | | | | Remove useless `Viewport::gui.key_input_accepted`
| * | Remove Useless Viewport::gui.key_input_accepted27505581082024-09-131-47/+14
| |/
* | Merge pull request #93500 from anniryynanen/multi-pressRémi Verschelde2024-09-161-1/+3
|\ \ | | | | | | | | | Improve button behavior when multiple mouse buttons are used at the same time
| * | Improve button behavior when multiple mouse buttons are used at the same timeAnni Ryynänen2024-09-151-1/+3
| | | | | | | | | | | | | | | | | | - To emit `pressed`, buttons require that the press was initiated while hovering. - Controls can't grab focus from a mouse click if they're not hovered. - Hovers are updated both before and after a handled mouse button event.
* | | Enable Drag and Drop for SubViewports and WindowsMarkus Sauermann2024-09-151-113/+55
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Expose Viewport.gui_cancel_drag() to GDScript as a counterpart to ↵graydoubt2024-09-061-0/+1
| | | | | | | | Control.force_drag()
* | Merge pull request #95902 from kitbdev/remove-forced-mouse-focusRémi Verschelde2024-09-031-24/+5
|\ \ | | | | | | | | | Clean up Viewport's `forced_mouse_focus`
| * | Clean up Viewport forced_mouse_focuskit2024-08-211-24/+5
| | |
* | | Fix SubViewport/AudioStreamPlayer2D crashaaronp642024-09-031-0/+3
| | | | | | | | | | | | Updated Viewport destructor to remove itself from World2D, to avoid World2D keeping invalid pointers.
* | | Merge pull request #92536 from Daylily-Zeleen/daylily-zeleen/fix_3d_input_eventRémi Verschelde2024-08-281-0/+4
|\ \ \ | | | | | | | | | | | | Add missing check to avoid passing handled input event to collision object 3d.
| * | | Avoid passing handled input event to collision object 3d.Daylily-Zeleen2024-07-271-0/+4
| | | |
* | | | Merge pull request #95846 from jadoc/fix-tooltipsRémi Verschelde2024-08-261-1/+6
|\ \ \ \ | |_|/ / |/| | | | | | | Only reset the tooltip timer when the mouse has actually moved
| * | | Only reset tooltip timer when mouse actually movedAlex Docauer2024-08-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InputEventMouseMotion isn't guaranteed to fire only on actual mouse movement. It's not uncommon for the underlying OS motion event to be sent either by the OS itself or another application even though the mouse hasn't moved. Godot will generate such zero-motion InputEventMouseMotion events itself for things like cursor shape changes. Once started, the tooltip timer is reset only after a mouse movement of at least 5 pixels in one frame.
* | | | Redraw SubViewportContainer on SubViewport size changejordi2024-08-191-0/+1
|/ / /
* | | Merge pull request #92391 from rburing/fti_3dRémi Verschelde2024-08-161-0/+7
|\ \ \ | | | | | | | | | | | | Physics interpolation (3D)
| * | | Fixed Timestep Interpolation (3D)Ricardo Buring2024-07-071-0/+7
| |/ / | | | | | | | | | | | | | | | | | | Adds 3D fixed timestep interpolation to the rendering server. This does not yet include support for multimeshes or particles. Co-authored-by: lawnjelly <lawnjelly@gmail.com>
* | | Merge pull request #91965 from aaronp64/tooltip_sizeRémi Verschelde2024-08-161-0/+1
|\ \ \ | |/ / |/| | | | | Fix tooltip content being cut off at some display scales
| * | Fix tooltip content being cut off at some display scalesaaronp642024-05-151-0/+1
| | | | | | | | | | | | | | | | | | When getting the minimum size for a tooltip, we get the value as a Vector2. Window::set_size() takes a Vector2i, so this size was getting truncated. At certain display scales, this could be enough to cut off part of the tooltip. Updated to call Vector2::ceil() to round up before calling Window::set_size() Fixes #91958
* | | Fix subwindow titlebar redraw on oversampling change.bruvzg2024-06-231-1/+10
| |/ |/|
* | Use `_camera_3d_set` instead of change camera_3d directlyAinsley2024-06-201-2/+1
| |
* | Merge pull request #91997 from aaronp64/tooltip_transformsRémi Verschelde2024-06-101-2/+2
|\ \ | | | | | | | | | Fix tooltip mouse position conversion for scaled controls
| * | Fix tooltip mouse position conversion for scaled controlsaaronp642024-05-151-2/+2
| |/ | | | | | | | | | | 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
* / Force canvas item update on oversampling change.bruvzg2024-06-031-2/+3
|/
* Use Core/Scene stringnames consistentlykobewi2024-05-131-3/+2
|
* [Core] Add `LocalVector::has` for convenienceA Thousand Ships2024-05-061-2/+2
|
* Improvements to VRS/Foveated renderingBastiaan Olij2024-05-031-0/+35
|
* Merge pull request #91425 from Sauermann/fix-force-drag-focus-crashRémi Verschelde2024-05-021-0/+1
|\ | | | | | | Make `mouse_focus` and `mouse_focus_mask` consistent for force_drag
| * Make `mouse_focus` and `mouse_focus_mask` consistent for force_dragMarkus Sauermann2024-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | [Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`A Thousand Ships2024-05-021-3/+3
|/ | | | Convenience for a number of cases operating on single values
* Remove unused variable Viewport::gui.last_mouse_focusMarkus Sauermann2024-05-011-4/+0
| | | | The last use was removed in January 2023
* OpenXR: Change timing of xrWaitFrame and add thread safety features to OpenXRBastiaan Olij2024-05-011-0/+12
|
* Merge pull request #89643 from mnemoli/pickone-fix-89641Rémi Verschelde2024-04-301-3/+4
|\ | | | | | | Fix mouse events when `physics_object_picking_first_only` enabled
| * Fix mouse_enter/mouse_exit events when physics_object_picking_first_only is onmnemoli2024-03-181-3/+4
| |
* | Overhaul TextEdit selection.kit2024-04-261-0/+7
| | | | | | | | The caret is now a part of the selection.
* | Add separate feature tags for editor runtimekobewi2024-04-261-1/+1
| |
* | Fix non-embedded Windows resizing to match Viewport content scale factorKoyper2024-04-171-3/+13
| |
* | Merge pull request #89880 from dsnopek/openxr-composition-layers-node3d-drsRémi Verschelde2024-04-041-0/+4
|\ \ | | | | | | | | | Add support for OpenXR composition layers
| * | Add support for OpenXR composition layersDavid Snopek2024-04-041-0/+4
| | | | | | | | | | | | Co-authored-by: Bastiaan Olij <mux213@gmail.com>
* | | Fix a special case for button masksMarkus Sauermann2024-03-281-3/+4
|/ / | | | | | | | | | | | | | | | | In certain situations it is possible that in a `Viewport` the same mouse button is pressed twice in series without releasing it in between. In this case, focus stealing should happen to ensure, that the mouse button is not sent unintentionally to the previously focused Control node.
* | Merge pull request #89805 from AThousandShips/viewport_reportRémi Verschelde2024-03-251-0/+1
|\ \ | | | | | | | | | Add missing `RenderInfoType` enum to `Viewport`
| * | Add missing `RenderInfoType` enum to `Viewport`A Thousand Ships2024-03-231-0/+1
| |/