Commit graph

92 commits

Author SHA1 Message Date
bruvzg
cfdb968848
[Window] Allow to override viewport and project settings and force use of native window. 2024-03-04 23:06:27 +02:00
Rémi Verschelde
c9b531c613
Merge pull request #88920 from AThousandShips/group_doc_fix
[Doc] Fix some incorrect uses of "children"
2024-02-29 13:54:18 +01:00
A Thousand Ships
9b5cd8e240
[Doc] Fix some incorrect uses of "children" 2024-02-29 11:52:55 +01:00
Hugo Locurcio
3fe01226b7 Use black for font outlines by default instead of white
This makes font outlines more usable out of the box, as black
is one of the most commonly used colors for font outlines.
2024-02-28 20:25:15 +01:00
Raul Santos
5ba92e5a57
Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames.
- Use `Variant()` in DEFVAL for Variants.
2024-02-23 01:50:18 +01:00
Micky
f9a758772a Update many Deprecated/Experimental descriptions for consistency 2024-02-17 21:33:12 +01:00
Michael Alexsander
7b42c24550
Make auto translation inheritable 2024-02-15 16:51:19 -03:00
Danil Alexeev
af28f87791
Documentation: Add support for deprecated/experimental messages 2024-02-15 15:59:50 +03:00
bruvzg
0d88aadd53
Automatically set viewport background to transparent when window flag is set. 2024-02-02 10:40:26 +02:00
Rémi Verschelde
03767fbf3b
Merge pull request #86446 from reduz/transient-to-focused
Implement a `transient_to_focused` Window mode
2024-01-15 13:25:00 +01:00
Juan Linietsky
15144c24bd Implement a transient_to_focused mode
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.
2024-01-14 18:51:44 +01:00
Jakub Marcowski
06534f8ad5 Add deprecation notice to a duplicate method of class Window 2024-01-12 18:18:28 +01:00
Rémi Verschelde
0358abbeba
Merge pull request #82179 from bruvzg/mode_docs
[Docs] Update and sync Window and DisplayServer window mode descriptions.
2023-10-03 17:22:05 +02:00
bruvzg
72e2e47059
[DisplayServer] Add method to estimate window title bar size. 2023-10-03 16:13:52 +03:00
bruvzg
c8df5e7291
[Docs] Update and sync Window and DisplayServer window mode descriptions. 2023-10-02 23:47:32 +03:00
Jordyfel
9819ffb166 Implement window center function. 2023-08-26 21:34:21 +03:00
Rémi Verschelde
33198d0df0
Merge pull request #75784 from Riteo/int-scale
Add content scale stretch modes, implement integer scaling
2023-08-11 10:32:11 +02:00
Riteo
87cfc415a3 Add content scale stretch modes, implement integer scaling
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>
2023-08-10 19:45:47 +02:00
Michael Alexsander
f270163ab0
Expose Window's _get_contents_minimum_size() to scripting 2023-08-02 14:40:38 -03:00
Rémi Verschelde
2a9aaae8a5
Merge pull request #79293 from ItsNL/add-accept-dialog-close-on-unfocused
Check `FLAG_POPUP` to close an AcceptDialog when parent is focused
2023-08-02 12:17:06 +02:00
Markus Sauermann
1c3c17c608 Refactor mouse_entered and mouse_exited notifications
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.
2023-08-01 13:28:49 +02:00
NL
a77d8b3eb5 Check FLAG_POPUP to close an AcceptDialog when parent is focused 2023-07-19 16:06:02 +02:00
Markus Sauermann
576980f960 Add a default theme for unfocused Windows
At the moment it is impossible to distinguish between focused and
unfocused embedded Windows.
Add a new `theme_item` that is used for coloring the border of
unfocused Windows.
2023-07-12 22:35:03 +02:00
Rémi Verschelde
81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde
346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
Markus Sauermann
a1f517b77d Fix documentation of popup_centered_ratio 2023-06-23 22:35:25 +02:00
Yuri Sizov
989dedddf9
Merge pull request #77577 from YeldhamDev/improve_window_docs
Improve `Window` documentation
2023-05-29 17:34:24 +02:00
Michael Alexsander
f7fced5e00
Improve Window documentation 2023-05-29 11:18:31 -03:00
VolTer
151a4ba6a5 Overhaul the top sections of the class reference (GUI classes) 2023-05-28 14:24:54 +02:00
Arman Elgudzhyan
49890a99c1 Expose get_window_id() from Window class
Window classes often need a Window ID for operations. This will help with performing operations on cached Windows.
2023-05-20 14:48:24 -07:00
Yuri Sizov
17f492fb82 Expose dialog parent-and-popup logic to the API 2023-05-15 19:49:28 +02:00
Max Hilbrunner
921d231ad6
Merge pull request #76664 from Xenoparrot/simple-typos 2023-05-06 15:41:55 +02:00
kobewi
33b9be27d3 Some clarifications on screen-space coordinates 2023-05-03 20:15:49 +02:00
UltraBIF
8106d33d0f Fixed various typos across the docs 2023-05-02 18:24:32 -04:00
Yuri Sizov
391eccca76 Validate code tags in documentation for potential params
Adds a check to make_rst to look for matches
between the text inside of the [code][/code] tag
and known param identifiers.
Fixes most of what was revealed.
2023-04-26 21:36:04 +02:00
bruvzg
520a8d8ed2
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method. 2023-04-19 08:54:53 +03:00
Haoyu Qiu
766807506c Fix various typos in the classref 2023-04-18 19:53:47 +08:00
pcamp
112977be26
Fix typo in Window class.
"event as" -> "events will be"
2023-03-12 19:53:12 -05:00
Haoyu Qiu
03fcac3aa5 Fix various typos in the classref 2023-03-09 14:56:23 +08:00
Rémi Verschelde
cdddb726b1
Merge pull request #74130 from iamjustkoi/patch-1
Fix small mistake in Window.xml
2023-03-02 11:20:56 +01:00
Rémi Verschelde
1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
JustKoi
7f8425d6fb Fix small mistake in Window.xml
Fix small mistake in Window.xml
2023-02-28 18:05:58 -05:00
Rindbee
593598c592 Calling popup_center* with the default size will use the current size 2023-02-11 18:53:53 +08:00
Rémi Verschelde
b342dcdf04
Remove some unused signals
Part of #37604.
2023-01-31 18:54:04 +01:00
bruvzg
aade5abd4f
Reorganize main and sub-window initial position properties. 2023-01-19 13:44:06 +02:00
bruvzg
c6ed9bb77e
Fix typo and add missing docs for WINDOW_FLAG_MOUSE_PASSTHROUGH. 2023-01-16 14:25:32 +02:00
bruvzg
34b34b104c
Add WINDOW_FLAG_MOUSE_PASSTHROUGH flag and enabled it for tooltips. Expose window_set_mouse_passthrough to Window. 2023-01-16 11:42:49 +02:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
Yuri Sizov
29cc86fa6c Copy local theme overrides from Control to Window 2022-12-07 20:50:51 +03:00
bruvzg
edf13eb5a6
Rename window_get_real_size to window_get_size_with_decorations, add window_get_position_with_decorations. 2022-12-07 11:07:30 +02:00