summaryrefslogtreecommitdiffstats
path: root/scene/gui/subviewport_container.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-2/+2
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Update Node::get_configuration_warnings signatureRedMser2024-02-081-2/+2
|
* Enable filtering `InputEvent`-sending in `SubViewportContainer`Markus Sauermann2023-10-021-0/+16
| | | | | Introduce an user overridable function, that allows filtering, if an `InputEvent` should be sent to `SubViewport` children.
* Refactor mouse_entered and mouse_exited notificationsMarkus Sauermann2023-08-011-8/+0
| | | | | | | | | | | | | | | | | | 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.
* Merge pull request #79805 from kumikumi/fix-subviewport-cursorYuri Sizov2023-07-261-0/+4
|\ | | | | | | Prevent SubViewportContainer overriding Subviewport's cursor with its own cursor
| * Don't override SubViewport's cursor with SubViewportContainer's cursorMikko Ankkala2023-07-231-0/+4
| | | | | | | | | | | | Add a warning for having a non-default value of `mouse_default_cursor_shape` in SubViewportContainer Add test
* | Make `SubViewportContainer` event propagation aware of focused ControlMarkus Sauermann2023-07-171-1/+22
|/ | | | | | | | | | | | | | | | Propagate `InputEvents` without position either - during the Input-stage, when it has focus or - during the Unhandled-Input-stage, otherwise This makes sure that Gui-Input happens in the correct order. Move "Unhandled key Input" handling before "Unhandled Input" handling, so that Unicode input with Alt / Ctrl modifiers are sent to the nodes in the correct order. Change the default focus mode of `SubViewportContainer` from `FOCUS_NONE` to `FOCUS_CLICK`, to automatically remove focus from other `Control`-nodes, when clicking inside a `SubViewport`.
* Move call of `push_unhandled_input` from `Window` to `Viewport`Markus Sauermann2023-03-171-28/+0
| | | | | | | | | This solves the problem, that mouse events get sent to SubViewports even if they are outside of the visible area of the SubViewport. This changes makes SubViewportContainer::unhandled_input redundand. Shortcut Events now need to be distributed via push_input, in order for them to be able to reach SubViewports.
* Fix some ways to create inconsistent Viewport sizesMarkus Sauermann2023-02-131-14/+8
| | | | | | | | 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`.
* Merge pull request #66906 from Sauermann/fix-prohibit-inconsistent-size-stateRémi Verschelde2023-02-011-2/+2
|\ | | | | | | Prohibit inconsistent size state for SubViewport
| * Prohibit inconsistent size state for SubViewportMarkus Sauermann2023-01-311-2/+2
| | | | | | | | Prohibit size changes of SubViewports with parent SubViewportContainers that have stretch mode enabled.
* | Merge pull request #58334 from Sauermann/fix-to-gui-or-not-to-guiRémi Verschelde2023-01-271-7/+34
|\ \ | | | | | | | | | Fix SubViewportContainer processing Events before other Control-Nodes
| * | Adjust SubViewportContainer event handlingMarkus Sauermann2022-10-021-7/+34
| |/ | | | | | | | | Change SubViewportContainer, so that it processes events with a position property no longer in 'input', but in 'gui_input'. This fixes the issue, that Nodes within its SubViewport receive MouseButton events before other Control-Nodes.
* | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* | Fix Viewport being visible after leaving treeMarkus Sauermann2022-11-231-0/+12
|/ | | | | | | | | When a SubViewport leaves the tree, it is still displayed in its parent SubViewportContainer until the next redraw. This PR makes sure, that the parent gets redrawn immediately. This also fixes the visibility problem when a SubViewport is added as child of a SubViewportContainer.
* Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-2/+2
|
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-2/+2
| | | | | | | | | | Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
* Add some codes, returnes directly if the value is not changed.风青山2022-08-231-0/+4
| | | | Avoid executing the following value-changed logics if the value does not really change.
* Fix event transform in SubViewportContainerMarkus Sauermann2022-03-301-2/+2
| | | | The transform does not take the canvas transform into account.
* String: Remove TTR and DTR defines in non-tools buildRémi Verschelde2022-03-281-1/+1
| | | | | This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
* Add configuration warning for SubViewportContainerMarkus Sauermann2022-03-261-0/+17
|
* Connect notifications from Container to ViewportMarkus Sauermann2022-02-151-0/+18
| | | | mouse enter+exit
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-39/+42
|
* Reorganize inspector layout workflow for Control nodesYuri Sizov2022-02-101-0/+8
|
* Update the minimum size of ViewportContainerTomasz Chabora2022-01-061-0/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz2021-08-231-6/+4
| | | | | | | | * `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
* Fix crashes in *_input functionsRafał Mikrut2021-04-051-0/+4
|
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-2/+0
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-17/+32
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-20/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Style: Add missing copyright headersRémi Verschelde2020-05-101-1/+1
|
* Rename ViewportContainer to SubViewportContainerMichael Alexsander2020-04-011-0/+215