summaryrefslogtreecommitdiffstats
path: root/scene/main/window.h
Commit message (Collapse)AuthorAgeFilesLines
* Set clang-format `RemoveSemicolon` rule to `true`Adam Scott2024-10-251-1/+1
| | | | - Set clang-format `Standard` rule to `c++20`
* Merge pull request #97005 from Repiteo/core/window-corner-styleThaddeus Crews2024-10-211-0/+1
|\ | | | | | | Core: Add `DisplayServer` flag for sharp corners
| * Core: Add `DisplayServer` flag for sharp cornersThaddeus Crews2024-10-181-0/+1
| |
* | Add System Locale layout direction for Control and WindowHaoyu Qiu2024-10-171-2/+7
|/
* Enable Drag and Drop for SubViewports and WindowsMarkus Sauermann2024-09-151-1/+1
| | | | | | | | | | | | | | | 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.
* StringName: Fix empty hashrune-scape2024-09-091-4/+0
| | | | +Fixed compat hashes
* Fix Window position preview in the editor.bruvzg2024-05-291-0/+2
|
* [Window] Allow to override viewport and project settings and force use of ↵bruvzg2024-03-041-0/+4
| | | | native window.
* Merge pull request #84906 from /fix-some-defvalsRémi Verschelde2024-02-231-0/+4
|\
| * Fix some DEFVALs to use the right typeRaul Santos2024-02-231-0/+4
| | | | | | | | | | - Use `StringName()` in DEFVAL for StringNames. - Use `Variant()` in DEFVAL for Variants.
* | Revert "Fix `NOTIFICATION_WM_SIZE_CHANGED` firing if the size hasn't changed"Michael Alexsander2024-02-211-1/+0
|/ | | | | This reverts commit 957378a69eb4dbd0066f91a9f4e44dc02cd360bd, reversing changes made to 0d88840e81596e8378f8cc444c6fcb61cfa676d0.
* Make auto translation inheritableMichael Alexsander2024-02-151-6/+6
|
* Merge pull request #86446 from reduz/transient-to-focusedRémi Verschelde2024-01-151-0/+4
|\ | | | | | | Implement a `transient_to_focused` Window mode
| * Implement a transient_to_focused modeJuan Linietsky2024-01-141-0/+4
| | | | | | | | | | | | | | This intends to be the correct way to handle non-child windows becoming covered by the current window when becoming focused. Enabling this property on select windows, they will become transient to the currently focused one when becoming visible. This deprecates the "unparent_when_invisible" function introduced by #76025.
* | Add deprecation notice to a duplicate method of class `Window`Jakub Marcowski2024-01-121-0/+2
| |
* | Merge pull request #84151 from YeldhamDev/that_was_not_a_resize_you_dunceRémi Verschelde2024-01-021-0/+1
|\ \ | |/ |/| | | Fix `NOTIFICATION_WM_SIZE_CHANGED` firing if the size hasn't changed
| * Fix `NOTIFICATION_WM_SIZE_CHANGED` firing if the size hasn't changedMichael Alexsander2023-10-311-0/+1
| |
* | Merge pull request #85000 from bruvzg/ed_ui_directionYuri Sizov2023-12-191-0/+4
|\ \ | | | | | | | | | [Editor] Add option to override editor UI layout direction.
| * | [Editor] Add option to override editor UI layout direction.bruvzg2023-11-171-0/+4
| |/
* / Fix internal events not being delivered to some Window typesMarkus Sauermann2023-11-141-0/+1
|/ | | | | | | | | | `AcceptDialog`, `Popup` and `PopupMenu` no longer subscribe to "window_input" signal, because that is only sent if it is not an internal signal. Instead they receive events in `_input_from_window`. They ensure that the event is also propagated to their super-function, just like previously the signals would be treated.
* [DisplayServer] Add method to estimate window title bar size.bruvzg2023-10-031-0/+5
|
* Merge pull request #82590 from ↵Rémi Verschelde2023-10-021-2/+4
|\ | | | | | | | | | | YuriSizov/window-you-come-to-me-on-this-day-the-day-when-my-child-becomes-exclusive-with-a-transient-parent-to-ask-for-this Add more context to some `Window` errors
| * Add more context to some `Window` errorsYuri Sizov2023-09-301-2/+4
| |
* | [FileDialog] Make set_visible compatible with native dialogs.bruvzg2023-09-301-1/+1
|/
* Bind remaining theme properties to their respective classesYuri Sizov2023-09-131-3/+23
| | | | | | | | | | | | This adds binds for GraphEdit/GraphElement/GraphNode, which were skipped before due to a rework. This also adds binds for Window, which was skipped before due to a complicated code organization. Also adds theme cache entries/direct cache access to a few places that previously missed it. Some theme properties are now exposed to other classes via friendships or public getters for convenience. This removes all string-based theme access from scene/ classes.
* Register theme properties with ThemeDBYuri Sizov2023-09-111-0/+1
|
* Introduce the concept of global theme contextsYuri Sizov2023-09-061-0/+3
| | | | | | | | | | | | | | | | | This commit adds the default theme context, which replaces the need to manually check the project and the default theme all the time; simplifies related code. It also adds framework for custom theme contexts, to be used by the editor. Custom contexts can be attached to any node, and not necessarily a GUI/Window node. Contexts do no break theme inheritance and only define which global themes a node uses as a fallback. Contexts propagate NOTIFICATION_THEME_CHANGED when one of their global themes changes. This ensures that global themes act just like themes assigned to individual nodes and can be previewed live in the editor.
* Add EditorStringNames singletonkobewi2023-09-031-0/+3
|
* Implement window center function.Jordyfel2023-08-261-0/+1
|
* Merge pull request #80334 from Sauermann/fix-window-out-of-viewport-eventsRémi Verschelde2023-08-161-0/+4
|\ | | | | | | Fix nodes receiving mouse events in black bars of `Window`
| * Fix nodes receiving mouse events in black bars of `Window`Markus Sauermann2023-08-091-0/+4
| | | | | | | | | | | | | | | | Previously for InputEvents there was no distinction between Window-area and Viewport-area. This was problematic in cases where stretching was used and the Window contained black bars at the sides of the Viewport. This PR separates the area of Window and Viewport regarding InputEvents.
* | Merge pull request #75784 from Riteo/int-scaleRémi Verschelde2023-08-111-0/+10
|\ \ | |/ |/| | | Add content scale stretch modes, implement integer scaling
| * Add content scale stretch modes, implement integer scalingRiteo2023-08-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integer scaling is achieved (after aspect expansion) by "lying" to the stretching code about the window's size, telling it that it's always an integer multiple of the viewport so that it only gets stretched to an integer factor. This approach works with all stretch and aspect modes and doesn't require handling for each, only requiring to "loosen up" some self-excluding conditions (in other words, replacing some `else if`s with just `if`s) regarding viewport offset and margin calculation (black bars). Includes a tiny usability change that adds a range hint for the content scale factor between 0.5 to 8.0. Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
* | Expose `Window`'s `_get_contents_minimum_size()` to scriptingMichael Alexsander2023-08-021-1/+4
| |
* | Refactor mouse_entered and mouse_exited notificationsMarkus Sauermann2023-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | [macOS] Implement optional native file selection dialog support for ↵bruvzg2023-07-121-1/+1
| | | | | | | | sandboxed apps.
* | Fix missing enum value for `Window.initial_position`jeana helver2023-06-211-0/+2
| | | | | | | | | | | | Reorder the properties in a possibly more intuitive order. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* | Fix mouse position with screen transformMarkus Sauermann2023-06-091-0/+1
| | | | | | | | | | | | | | | | | | When a Viewport is not directly attached to the screen, the function `Viewport::get_mouse_position` can't rely on `get_screen_transform`, because that function is ambiguous in these situations. In these cases it is necessary to use the mouse position from the most recent mouse IputEvent.
* | Create a virtual mouse move event after moving child nodesMarkus Sauermann2023-05-291-1/+1
| | | | | | | | | | This updates mouse cursor and mouse-over-states without the need for additional mouse movements.
* | Expose dialog parent-and-popup logic to the APIYuri Sizov2023-05-151-2/+14
| |
* | Add project manager / editor initial screen settings, implement ↵bruvzg2023-04-191-0/+2
|/ | | | DisplayServer.get_keyboard_focus_screen method.
* Add a warning when trying to access theme items too earlyYuri Sizov2023-04-031-0/+1
|
* Apply clamp_to_embedder on parent resize and popup.Ryan Roden-Corrent2023-03-271-0/+1
| | | | | | | | | | | Fixes #75084. The clamp_to_embedder setting was added in 8be16e0704873f0c9bab8c10dafe2607a00ff78f, 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.
* Fix Color PickingMarkus Sauermann2023-02-091-1/+1
| | | | | | | | | | | 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.
* Merge pull request #62179 from Rindbee/fix-popup_center-off-centerRémi Verschelde2023-02-071-0/+6
|\ | | | | | | Use min_size/max_size to limit window size and position while popup center
| * Use min_size/max_size to limit the window size and the position while popup ↵Rindbee2023-02-071-0/+6
| | | | | | | | center
* | Fix Viewport::get_mouse_position for SubViewportsMarkus Sauermann2023-02-071-1/+1
|/ | | | | | SubViewports don't have a cached mouse position available. This PR calculates the mouse position from the screen position of the mouse cursor.
* Remove `Viewport::_get_input_pre_xform`Markus Sauermann2023-02-021-0/+1
| | | | | This function is only relevant for `Window`. So this PR moves the functionality to the `Window`-class.
* Merge pull request #59310 from Sauermann/proposal-event-transformRémi Verschelde2023-01-311-0/+2
|\ | | | | | | Calculate window input event transform only on window change
| * Calculate window input event transform only on window changeMarkus Sauermann2022-10-011-0/+2
| |