summaryrefslogtreecommitdiff
path: root/scene/main
AgeCommit message (Collapse)Author
2023-05-12Improve the UX of ViewportTexture in the editorRindbee
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)
2023-05-12Prevent errors when using ViewportTexturekobewi
(cherry picked from commit 1b9802fa8cb45e876cd90d6a174b95b270a7f934)
2023-05-12Add missing documentation for MultiplayerPeerExtensionDavid Snopek
(cherry picked from commit 4d13be3c5eab71b04f6d7a0ed9d7e8679b377494)
2023-04-26Fix invalid global position when read outside treekobewi
(cherry picked from commit 727a4ed79a371d87be06a8101c9eedd48ecc3e01)
2023-04-24Rename internal root canvas group to start with underscoreangel-721
(cherry picked from commit e347d7d64d1a6f9fe9993b93f88f7af19cd784dd)
2023-04-24Always cache parent visibility in CanvasItemYuri Sizov
(cherry picked from commit fd6a743823932639ba30e54d7e65ccd42192d88d)
2023-04-07Prevent off-screen controls in editorkobewi
(cherry picked from commit 55b50703d7d5cc6322f0806f7580ac31e8553f73)
2023-03-27More i18n improvementsHaoyu Qiu
* Make placeholder in editor layout dialog translatable. * Make messages in scene import settings dialog translatable. * Mark theme override property categories for translation. (cherry picked from commit 5a5fd33e42239cb59aa34899675ca4e2a2c99106)
2023-03-27CanvasItem Fix ENTER_CANVAS / VISIBILITY_CHANGED notifications order when ↵kleonc
entering tree (cherry picked from commit 6e3820fd4dfb93f9be98fa86f989d123024ed216)
2023-03-27Improve layout direction/locale automatic selection.bruvzg
(cherry picked from commit 82d7923c653b6328ba279bd4183b63b69e21edfc)
2023-03-27Fix some ways to create inconsistent Viewport sizesMarkus Sauermann
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)
2023-03-13Automatically reparent editor message dialogs to avoid error spam.bruvzg
(cherry picked from commit 921f3b7589084e07a4b6eefd89ec7fe81857a8b7)
2023-02-27[MP] Fix orphan StringName on close.Fabio Alessandrelli
Use a static StringName for the registered default interface name.
2023-02-17Set RTL minimal dash size to 2.0, add invalid dash size error to the ↵bruvzg
`draw_dashed_line`.
2023-02-17Merge pull request #72764 from Sauermann/fix-color-pickingRémi Verschelde
Fix Color Picking
2023-02-16Add dash and step size checks to draw_dashed_line.bruvzg
2023-02-14Clear Window before blitting Viewport in gl_compatibility rendererclayjohn
2023-02-14Merge pull request #68027 from ktxyz/window-on-topRémi Verschelde
Update sub_windows order with respect to FLAG_ALWAYS_ON_TOP
2023-02-14Some fixes for initial window position and sizeThomas ten Cate
- X11: set main window position and size hints correctly - All platforms: update minimum and maximum size of main window at startup Fixes #70984
2023-02-13Cleanup Window callbacks before destroying in to avoid callback calls with ↵bruvzg
invalid object.
2023-02-11Merge pull request #73040 from Rindbee/popup_centered_consider_current_sizeRémi Verschelde
Calling popup_center* with the default size will use the current size
2023-02-11Calling popup_center* with the default size will use the current sizeRindbee
2023-02-10Merge pull request #73000 from Sauermann/fix-editor-viewport-size-zero-crashRémi Verschelde
Fix crash in editor when setting `SubViewport.size` to zero
2023-02-10Fix crash in editor when setting `SubViewport.size` to zeroMarkus Sauermann
`Viewport::_set_size` now verifies, that the minimum size is at least 2x2. Also fix `RendererViewport::viewport_set_size` fail condition.
2023-02-09Fix that `popup_centered` didn't take the window's size into considerationMarkus Sauermann
2023-02-09Fix Color PickingMarkus Sauermann
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.
2023-02-08Optimize `draw_dashed_line()` and `draw_rect()`Danil Alexeev
2023-02-07Merge pull request #62179 from Rindbee/fix-popup_center-off-centerRémi Verschelde
Use min_size/max_size to limit window size and position while popup center
2023-02-07Merge pull request #72829 from Sauermann/fix-code-simplificationsRémi Verschelde
Some code simplifications
2023-02-07Some code simplificationsMarkus Sauermann
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`
2023-02-07Use min_size/max_size to limit the window size and the position while popup ↵Rindbee
center
2023-02-07Fix Viewport::get_mouse_position for SubViewportsMarkus Sauermann
SubViewports don't have a cached mouse position available. This PR calculates the mouse position from the screen position of the mouse cursor.
2023-02-06Merge pull request #72740 from Sauermann/fix-event-device-idRémi Verschelde
Fix mouse/drag/touch InputEvents having no device id
2023-02-06Fix mouse/drag/touch InputEvents having no device idMarkus Sauermann
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`.
2023-02-06Fix MOUSE_FILTER_STOP not affecting emulated mouse eventsMarkus Sauermann
Touch and Drag events are now stopped by MOUSE_FILTER_STOP
2023-02-06Merge pull request #68492 from Sauermann/fix-picking-sortRémi Verschelde
Fix propagation order for 2D physics picking events
2023-02-04Fix propagation order for 2D physics picking eventsMarkus Sauermann
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.
2023-02-03Fix Camera2D crash due to ParallaxBackground nodekobewi
2023-02-02Remove `Viewport::_get_input_pre_xform`Markus Sauermann
This function is only relevant for `Window`. So this PR moves the functionality to the `Window`-class.
2023-02-02Merge pull request #72618 from Sauermann/fix-simplify-set-sizeRémi Verschelde
Simplify Viewport::_set_size
2023-02-02Simplify Viewport::_set_sizeMarkus Sauermann
`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`.
2023-02-02Fix toplevel nomenclatureMarkus Sauermann
toplevel was 3.x top_level is 4.x
2023-02-01Fix Camera2D crasheskobewi
2023-02-01More codespell fixes, do more changes from previous ignore listRémi Verschelde
2023-02-01Merge pull request #67331 from Sauermann/fix-subviewport-no-stretch-updateRémi Verschelde
Fix stretch transform when resizing SubViewports
2023-02-01Merge pull request #58610 from Sauermann/fix-physics-mouseRémi Verschelde
Fix execution of physics picking events at unexpected times
2023-02-01Fix various typos with codespellRémi Verschelde
Finally do the childs -> children rename too.
2023-02-01Fix stretch transform when resizing SubViewportsMarkus Sauermann
Move calculation of stretch transform from outside to inside of `Viewport::_set_size` function.
2023-02-01Merge pull request #71936 from akien-mga/remove-some-unused-signalsRémi Verschelde
Remove some unused signals
2023-02-01Merge pull request #71479 from raulsntos/virtual-return-typeRémi Verschelde
Use enum instead of int in virtual methods return type