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
Hei
293ed314fd
Fix typo minimize button -> maximize button
...
Seems like a typo.
2022-10-30 16:28:44 +02:00
RedMser
5ae012e6e9
Add documentation for viewport's input handling
2022-10-05 12:56:04 +02:00
bruvzg
8574dac00e
[Docs] Synchronize and update Window and Display Server documentation.
2022-10-05 08:43:37 +03:00
bruvzg
0dab11afa4
[macOS extend-to-title] Add scene/project name to the editor title, fix incorrect window button position/order when system primary language is RTL.
2022-09-22 23:09:56 +03:00
bruvzg
d104a4cdbd
Add missing initial window flags and window mode to the project settings.
2022-09-19 12:30:10 +03:00
bruvzg
bc4ba6cb78
[macOS] Extend editor contents to the window titlebar for better space usage.
2022-08-26 15:12:43 +03:00
Aaron Record
74eb2a70bd
Refactor and remove excessive calls of NOTIFICATION_THEME_CHANGED
2022-08-25 14:50:49 -06:00
Andy Maloney
5361585832
[doc] Use "param" instead of "code" to refer to parameters
...
Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-08-09 10:09:07 -04:00
Yuri Sizov
c5d7115038
Rename the argument tag to param in XML documentation
2022-08-08 22:34:31 +03:00
Michael Alexsander
2b86c458bf
Fix some bugs with Window
s
2022-08-05 02:25:15 -03:00
kobewi
0f630f8307
Document most of the Window's members
2022-06-22 20:46:27 +02:00
FireForge
3073b85de9
Rename theme properties to include underscores
...
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
kobewi
63de41b996
Improvements to files_dropped signal
2022-04-11 00:37:06 +02:00
Igor Kordiukiewicz
b870b40d79
Remove files_dropped signal from SceneTree
2022-02-28 07:51:50 +01:00
bruvzg
74ff5921d6
Improve popup window handling.
...
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +02:00