Age | Commit message (Collapse) | Author |
|
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.
(cherry picked from commit af58f1e8547c8b6a2e6b83b7de9c3ac9bc05d881)
|
|
(cherry picked from commit 1b9802fa8cb45e876cd90d6a174b95b270a7f934)
|
|
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`.
(cherry picked from commit 34a7fc744762dcf66eff7e3b5e4d46e09e7c0bdc)
|
|
Fix Color Picking
|
|
Update sub_windows order with respect to FLAG_ALWAYS_ON_TOP
|
|
`Viewport::_set_size` now verifies, that the minimum size is at least 2x2.
Also fix `RendererViewport::viewport_set_size` fail condition.
|
|
With the 4.x-introduction of Windows the previous method for
color picking was no longer working.
This PR uses the following approach to reintroduce color-picking.
When the Color-Picking-Button is pressed, a quasi-screenshot of the
Window-content is created and displayed in a new Popup-Window.
This new Window allows selecting colors by Mouse-Click.
A Preview of the targeted Color is also displayed.
|
|
Use min_size/max_size to limit window size and position while popup center
|
|
Some code simplifications
|
|
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
|
|
center
|
|
SubViewports don't have a cached mouse position available.
This PR calculates the mouse position from the screen position of
the mouse cursor.
|
|
Fix mouse/drag/touch InputEvents having no device id
|
|
Some internally created emulated/instantiated events didn't have a
device id. This PR sets for these cases a device id.
Also rename `DEVICE_ID_TOUCH_MOUSE` to the more generic
`DEVICE_ID_EMULATION`.
|
|
Touch and Drag events are now stopped by MOUSE_FILTER_STOP
|
|
Fix propagation order for 2D physics picking events
|
|
This patch adds a viewport-configuration-option for sorting
physics-picking events by the Z-Index and the scene tree position
of the collision objects.
|
|
|
|
This function is only relevant for `Window`. So this PR moves
the functionality to the `Window`-class.
|
|
`Viewport.to_screen_rect` is used only in a single location to compare it
to `Rect2i()`.
When called from `SubViewport`, `to_screen_rect` is always equal to `Rect2i()`.
When called from `Window`, `to_screen_rect` is always different from `Rect2i()`.
So the comparison `to_screen_rect != Rect2i()` can be replaced by
`Object::cast_to<Window>(this)`.
This allows the removal of `Viewport.to_screen_rect` and the simplification of
`Viewport::_set_size`.
|
|
|
|
Fix stretch transform when resizing SubViewports
|
|
Fix execution of physics picking events at unexpected times
|
|
Move calculation of stretch transform from outside to inside
of `Viewport::_set_size` function.
|
|
Prohibit inconsistent size state for SubViewport
|
|
Prohibit size changes of SubViewports with parent SubViewportContainers that have stretch mode enabled.
|
|
Rework how current Camera2D is determined
|
|
Calculate window input event transform only on window change
|
|
|
|
Fix event-content and mouse-signals with 3D-capture-on-drag
|
|
Fix position of Tooltips
|
|
|
|
CanvasItem::get_screen_transform returns a transform from the CanvasItem
to the coordinate system, where a Popup - created as a child of the
CanvasItem - should be opened.
get_screen_transform makes some simplifications, that work well, when used
in the editor, but not in general cases.
Since Popups like Tooltips are now used more commonly in projects,
it becomes necessary to correct these simplifications.
This solution introduces Viewport::get_popup_base_transform, which makes
the necessary calculations.
|
|
Fix incorrect Viewport Debug Draw effects
|
|
|
|
|
|
Calculate the mouse focus inverse transform only when needed
|
|
`window_set_mouse_passthrough` to `Window`.
|
|
Revival of #49158
Co-authored-by: Marcel Admiraal <madmiraal@users.noreply.github.com>
|
|
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
|
|
screen detection.
|
|
Add PropertyInfo overload for GLOBAL_DEF
|
|
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".
|
|
|
|
Include the follow-viewport-transform into CanvasLayer transform calculations
|
|
The following-viewport-transform was missing from several calculations
|
|
|
|
|
|
|
|
Fix Viewport root order after Node2D raise
|