* 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.
Fixes#75084.
The clamp_to_embedder setting was added in 8be16e0704,
but was not set on any of the in-editor dialogs.
This patch sets `clamp_to_embedder` on editor dialogs so they cannot be dragged out of the frame.
This also modifies `clamp_to_embedder` so a window is clamped to the bounds of an embedder when
it pops up and when the parent is resized.
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`.
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.
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`
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`.
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.
`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`.
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.
* 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.