summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-07 13:21:36 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-07 13:21:36 +0100
commitd642274f75fb8ca6d3b9d4c314269e6f559051c7 (patch)
tree7dbf61077d234d636dfd33f85007bcc06f66fb69 /doc/classes
parent3579d7a9f74e3f1eda88826897feb4b866d75ec9 (diff)
parent2718a7b7d39962100e59b8616077603034d77f8e (diff)
Merge pull request #70939 from bruvzg/win_screen_2
Add support for the custom initial screen for the main window, fix primary screen detection.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/DisplayServer.xml16
-rw-r--r--doc/classes/ProjectSettings.xml3
-rw-r--r--doc/classes/Window.xml8
3 files changed, 26 insertions, 1 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 29135376c5..98e53b86f9 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -130,12 +130,25 @@
The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]).
</description>
</method>
+ <method name="get_primary_screen" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns index of the primary screen.
+ </description>
+ </method>
<method name="get_screen_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of displays available.
</description>
</method>
+ <method name="get_screen_from_rect" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="rect" type="Rect2" />
+ <description>
+ Returns index of the screen which contains specified rectangle.
+ </description>
+ </method>
<method name="get_swap_cancel_ok">
<return type="bool" />
<description>
@@ -1521,6 +1534,9 @@
<constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode">
Confines the mouse cursor to the game window, and make it hidden.
</constant>
+ <constant name="SCREEN_PRIMARY" value="-2">
+ Represents the primary screen.
+ </constant>
<constant name="SCREEN_OF_MAIN_WINDOW" value="-1">
Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
</constant>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index d4c42e36eb..cfcfca9880 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -596,6 +596,9 @@
Main window content is expanded to the full size of the window. Unlike a borderless window, the frame is left intact and can be used to resize the window, and the title bar is transparent, but has minimize/maximize/close buttons.
[b]Note:[/b] This setting is implemented only on macOS.
</member>
+ <member name="display/window/size/initial_screen" type="int" setter="" getter="" default="-2">
+ Main window initial screen.
+ </member>
<member name="display/window/size/mode" type="int" setter="" getter="" default="0">
Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves.
</member>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 16ca486e4a..4cd6cf41da 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -503,7 +503,7 @@
<member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, [Window]'s content will be scaled when the window is resized to a different size.
</member>
- <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
+ <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen">
The screen the window is currently on.
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
@@ -513,6 +513,8 @@
<member name="extend_to_title" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the [Window] contents is expanded to the full size of the window, window title bar is transparent.
</member>
+ <member name="initial_position" type="int" setter="set_initial_position" getter="get_initial_position" enum="Window.WindowInitialPosition" default="0">
+ </member>
<member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)">
If non-zero, the [Window] can't be resized to be bigger than this size.
[b]Note:[/b] This property will be ignored if the value is lower than [member min_size].
@@ -732,6 +734,10 @@
<constant name="LAYOUT_DIRECTION_RTL" value="3" enum="LayoutDirection">
Right-to-left layout direction.
</constant>
+ <constant name="WINDOW_INITIAL_POSITION_ABSOLUTE" value="0" enum="WindowInitialPosition">
+ </constant>
+ <constant name="WINDOW_INITIAL_POSITION_CENTER_SCREEN" value="1" enum="WindowInitialPosition">
+ </constant>
</constants>
<theme_items>
<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">