summaryrefslogtreecommitdiff
path: root/scene/main/window.h
AgeCommit message (Collapse)Author
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-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-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-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-01-31Merge pull request #59310 from Sauermann/proposal-event-transformRémi Verschelde
Calculate window input event transform only on window change
2023-01-27Merge pull request #71470 from YeldhamDev/window_fixesRémi Verschelde
Fix some small bugs in the `Window` node
2023-01-26Merge pull request #68627 from Sauermann/fix-tooltip-positionRémi Verschelde
Fix position of Tooltips
2023-01-26Fix position of TooltipsMarkus Sauermann
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.
2023-01-19Reorganize main and sub-window initial position properties.bruvzg
2023-01-18Fix some small bugs in the `Window` nodeMichael Alexsander
2023-01-16Add `WINDOW_FLAG_MOUSE_PASSTHROUGH` flag and enabled it for tooltips. Expose ↵bruvzg
`window_set_mouse_passthrough` to `Window`.
2023-01-11Automatically reparent editor progress dialog to avoid error spam.bruvzg
2023-01-07Add support for the custom initial screen for the main window, fix primary ↵bruvzg
screen detection.
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-07Copy local theme overrides from Control to WindowYuri Sizov
2022-12-07Rename `window_get_real_size` to `window_get_size_with_decorations`, add ↵bruvzg
`window_get_position_with_decorations`.
2022-10-11Prevent `Popup`s it the edited scene tree from closing on focus loss. Hide ↵bruvzg
irrelevant `Popup` flags from the editor inspector.
2022-10-01Calculate window input event transform only on window changeMarkus Sauermann
2022-09-18Update mouse cursor shape after changesMarkus Sauermann
This fixes some cases where the mouse cursor shape did not change automatically, but instead required a MouseMove to update.
2022-09-07Fix MOUSE_MODE_CAPTURED not working correctly with popupsMinusKube
2022-09-02Add ThemeOwner type for managing theme propagation and lookupYuri Sizov
2022-09-01Add dumb and manual theme caching systems to WindowYuri Sizov
2022-08-30Allow to change the Stop shortcut used at runtimekobewi
2022-08-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-26Merge pull request #64777 from bruvzg/extend_to_titleRémi Verschelde
[macOS] Extend editor contents to the window title bar for better space usage.
2022-08-26[macOS] Extend editor contents to the window titlebar for better space usage.bruvzg
2022-08-26Merge pull request #64574 from Begah/fix_transient_window_wrap_mouseRémi Verschelde
2022-08-25Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`Aaron Record
2022-08-25Fix warp_mouse for transient windows, smoother mouse positioning when ↵MathieuRoux
releasing mouse for spinbox
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-03-28Fix using Viewport::warp_mouse within ViewportsMarkus Sauermann
2022-03-10Revert "Update mouse cursor shape after changes"Markus Sauermann
This reverts commit 0fce98b4b5f568298477b175c70510924793f6b0.
2022-03-09Update mouse cursor shape after changesMarkus Sauermann
This fixes some cases where the mouse cursor shape did not change automatically, but instead required a MouseMove to update.
2022-02-25Improve popup window handling.bruvzg
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-04[Windows] Add WS_BORDER flag to windows in WINDOW_MODE_FULLSCREEN mode to ↵bruvzg
allow multi-window interface in full-screen. [Windows] Add WINDOW_MODE_EXCLUSIVE_FULLSCREEN without WS_BORDER flag enabled (no multi-window support).
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-17add 2d scale factor propertyAnsraer
2021-11-22Added `reset_size` method to `Control` and `Window` classesYuri Roubinsky
2021-10-04Add the base scale factor to the Theme resourceYuri Sizov
2021-08-13Fix some unnecessary includesAaron Franke
2021-07-29Add `auto_translate` toggle for automatic translationMichael Alexsander
2021-07-13Add type variations to ThemeYuri Sizov
2021-05-17Add theme_custom_type property to Control and WindowYuri Sizov
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-09Cleanup unused engine codeTomasz Chabora