2020-03-31 11:56:58 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 14:18:53 +01:00
<class name= "Window" inherits= "Viewport" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2020-03-31 11:56:58 +02:00
<brief_description >
2021-07-05 15:43:51 +02:00
Base class for all windows.
2020-03-31 11:56:58 +02:00
</brief_description>
<description >
2022-06-11 03:58:48 +02:00
A node that creates a window. The window can either be a native system window or embedded inside another [Window] (see [member Viewport.gui_embed_subwindows]).
At runtime, [Window]s will not close automatically when requested. You need to handle it manually using [signal close_requested] (this applies both to clicking close button and clicking outside popup).
2020-03-31 11:56:58 +02:00
</description>
<tutorials >
</tutorials>
<methods >
2022-11-29 21:01:45 +01:00
<method name= "add_theme_color_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "color" type= "Color" />
<description >
Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override].
See also [method get_theme_color] and [method Control.add_theme_color_override] for more details.
</description>
</method>
<method name= "add_theme_constant_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "constant" type= "int" />
<description >
Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override].
See also [method get_theme_constant].
</description>
</method>
<method name= "add_theme_font_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "font" type= "Font" />
<description >
Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override].
See also [method get_theme_font].
</description>
</method>
<method name= "add_theme_font_size_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "font_size" type= "int" />
<description >
Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override].
See also [method get_theme_font_size].
</description>
</method>
<method name= "add_theme_icon_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "texture" type= "Texture2D" />
<description >
Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override].
See also [method get_theme_icon].
</description>
</method>
<method name= "add_theme_stylebox_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "stylebox" type= "StyleBox" />
<description >
Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override].
See also [method get_theme_stylebox] and [method Control.add_theme_stylebox_override] for more details.
</description>
</method>
<method name= "begin_bulk_theme_override" >
<return type= "void" />
<description >
Prevents [code]*_theme_*_override[/code] methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called.
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "can_draw" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2021-07-05 15:43:51 +02:00
Returns whether the window is being drawn to the screen.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "child_controls_changed" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Requests an update of the [Window] size to fit underlying [Control] nodes.
2020-03-31 11:56:58 +02:00
</description>
</method>
2022-11-29 21:01:45 +01:00
<method name= "end_bulk_theme_override" >
<return type= "void" />
<description >
Ends a bulk theme override update. See [method begin_bulk_theme_override].
</description>
</method>
2021-07-02 20:35:56 +02:00
<method name= "get_contents_minimum_size" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2021-07-02 20:35:56 +02:00
<description >
2022-06-11 03:58:48 +02:00
Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when children nodes have changed.
2021-07-02 20:35:56 +02:00
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "get_flag" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "flag" type= "int" enum= "Window.Flags" />
2020-03-31 11:56:58 +02:00
<description >
2022-08-09 01:41:07 +02:00
Returns [code]true[/code] if the [param flag] is set.
2020-03-31 11:56:58 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "get_layout_direction" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "Window.LayoutDirection" />
2020-08-12 13:49:10 +02:00
<description >
Returns layout direction and text writing direction.
</description>
</method>
2022-11-30 09:28:16 +01:00
<method name= "get_position_with_decorations" qualifiers= "const" >
<return type= "Vector2i" />
<description >
Returns the window's position including its border.
</description>
</method>
<method name= "get_size_with_decorations" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2i" />
2020-03-31 11:56:58 +02:00
<description >
2021-07-05 15:43:51 +02:00
Returns the window's size including its border.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "get_theme_color" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Color" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type].
2022-06-11 03:58:48 +02:00
See [method Control.get_theme_color] for more details.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "get_theme_constant" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type].
2022-06-11 03:58:48 +02:00
See [method Control.get_theme_color] for more details.
2020-03-31 11:56:58 +02:00
</description>
</method>
2021-10-02 22:06:14 +02:00
<method name= "get_theme_default_base_scale" qualifiers= "const" >
<return type= "float" />
<description >
2022-11-29 21:01:45 +01:00
Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value.
See [method Control.get_theme_color] for details.
2021-10-02 22:06:14 +02:00
</description>
</method>
<method name= "get_theme_default_font" qualifiers= "const" >
<return type= "Font" />
<description >
2022-11-29 21:01:45 +01:00
Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value.
See [method Control.get_theme_color] for details.
2021-10-02 22:06:14 +02:00
</description>
</method>
<method name= "get_theme_default_font_size" qualifiers= "const" >
<return type= "int" />
<description >
2022-11-29 21:01:45 +01:00
Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value.
See [method Control.get_theme_color] for details.
2021-10-02 22:06:14 +02:00
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "get_theme_font" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Font" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "get_theme_font_size" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-08-12 13:49:10 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "get_theme_icon" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Texture2D" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "get_theme_stylebox" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "StyleBox" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "grab_focus" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-03-31 11:56:58 +02:00
<description >
2021-07-05 15:43:51 +02:00
Causes the window to grab focus, allowing it to receive user input.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "has_focus" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2021-07-05 15:43:51 +02:00
Returns [code]true[/code] if the window is focused.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "has_theme_color" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
</description>
</method>
<method name= "has_theme_color_override" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [param name] in this [Control] node.
See [method add_theme_color_override].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "has_theme_constant" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
</description>
</method>
<method name= "has_theme_constant_override" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if there is a local override for a theme constant with the specified [param name] in this [Control] node.
See [method add_theme_constant_override].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "has_theme_font" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
</description>
</method>
<method name= "has_theme_font_override" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [param name] in this [Control] node.
See [method add_theme_font_override].
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "has_theme_font_size" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-08-12 13:49:10 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
</description>
</method>
<method name= "has_theme_font_size_override" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if there is a local override for a theme font size with the specified [param name] in this [Control] node.
See [method add_theme_font_size_override].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "has_theme_icon" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
</description>
</method>
<method name= "has_theme_icon_override" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if there is a local override for a theme icon with the specified [param name] in this [Control] node.
See [method add_theme_icon_override].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "has_theme_stylebox" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "theme_type" type= "StringName" default= """" />
2020-03-31 11:56:58 +02:00
<description >
2022-11-29 21:01:45 +01:00
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for details.
</description>
</method>
<method name= "has_theme_stylebox_override" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node.
See [method add_theme_stylebox_override].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "hide" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with [method show].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "is_embedded" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2021-07-05 15:43:51 +02:00
Returns [code]true[/code] if the window is currently embedded in another window.
2020-03-31 11:56:58 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "is_layout_rtl" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code] if layout is right-to-left.
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "is_maximize_allowed" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Returns [code]true[/code] if the window can be maximized (the maximize button is enabled).
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "is_using_font_oversampling" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Returns [code]true[/code] if font oversampling is enabled. See [method set_use_font_oversampling].
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "move_to_foreground" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Moves the [Window] on top of other windows and focuses it.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "popup" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "rect" type= "Rect2i" default= "Rect2i(0, 0, 0, 0)" />
2020-03-31 11:56:58 +02:00
<description >
2022-08-09 01:41:07 +02:00
Shows the [Window] and makes it transient (see [member transient]). If [param rect] is provided, it will be set as the [Window]'s size.
2022-06-11 03:58:48 +02:00
Fails if called on the main window.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "popup_centered" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "minsize" type= "Vector2i" default= "Vector2i(0, 0)" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Popups the [Window] at the center of the current screen, with optionally given minimum size.
If the [Window] is embedded, it will be centered in the parent [Viewport] instead.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "popup_centered_clamped" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "minsize" type= "Vector2i" default= "Vector2i(0, 0)" />
<param index= "1" name= "fallback_ratio" type= "float" default= "0.75" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Popups the [Window] centered inside its parent [Window].
[code]fallback_ratio[/code] determines the maximum size of the [Window], in relation to its parent.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "popup_centered_ratio" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "ratio" type= "float" default= "0.8" />
2020-03-31 11:56:58 +02:00
<description >
2022-08-09 01:41:07 +02:00
Popups the [Window] centered inside its parent [Window] and sets its size as a [param ratio] of parent's size.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "popup_on_parent" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "parent_rect" type= "Rect2i" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Popups the [Window] with a position shifted by parent [Window]'s position.
If the [Window] is embedded, has the same effect as [method popup].
2020-03-31 11:56:58 +02:00
</description>
</method>
2022-11-29 21:01:45 +01:00
<method name= "remove_theme_color_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock.
</description>
</method>
<method name= "remove_theme_constant_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock.
</description>
</method>
<method name= "remove_theme_font_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock.
</description>
</method>
<method name= "remove_theme_font_size_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock.
</description>
</method>
<method name= "remove_theme_icon_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock.
</description>
</method>
<method name= "remove_theme_stylebox_override" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "request_attention" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Tells the OS that the [Window] needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar.
2020-03-31 11:56:58 +02:00
</description>
</method>
2021-11-20 09:04:57 +01:00
<method name= "reset_size" >
<return type= "void" />
<description >
Resets the size to the minimum size, which is the max of [member min_size] and (if [member wrap_controls] is enabled) [method get_contents_minimum_size]. This is equivalent to calling [code]set_size(Vector2i())[/code] (or any size below the minimum).
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "set_flag" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "flag" type= "int" enum= "Window.Flags" />
<param index= "1" name= "enabled" type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2021-07-05 15:43:51 +02:00
Sets a specified window flag.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "set_ime_active" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "active" type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2022-08-09 01:41:07 +02:00
If [param active] is [code]true[/code], enables system's native IME (Input Method Editor).
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "set_ime_position" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "position" type= "Vector2i" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Moves IME to the given position.
2020-03-31 11:56:58 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "set_layout_direction" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "direction" type= "int" enum= "Window.LayoutDirection" />
2020-08-12 13:49:10 +02:00
<description >
Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</description>
</method>
2020-03-31 11:56:58 +02:00
<method name= "set_use_font_oversampling" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "enable" type= "bool" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Enables font oversampling. This makes fonts look better when they are scaled up.
2020-03-31 11:56:58 +02:00
</description>
</method>
<method name= "show" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-03-31 11:56:58 +02:00
<description >
2022-06-11 03:58:48 +02:00
Makes the [Window] appear. This enables interactions with the [Window] and doesn't change any of its property other than visibility (unlike e.g. [method popup]).
2020-03-31 11:56:58 +02:00
</description>
</method>
</methods>
<members >
<member name= "always_on_top" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2022-06-11 03:58:48 +02:00
If [code]true[/code], the window will be on top of all other windows. Does not work if [member transient] is enabled.
2020-03-31 11:56:58 +02:00
</member>
2021-05-27 19:31:33 +02:00
<member name= "auto_translate" type= "bool" setter= "set_auto_translate" getter= "is_auto_translating" default= "true" >
Toggles if any text should automatically change to its translated version depending on the current locale.
</member>
2020-03-31 11:56:58 +02:00
<member name= "borderless" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2021-07-05 15:43:51 +02:00
If [code]true[/code], the window will have no borders.
2020-03-31 11:56:58 +02:00
</member>
<member name= "content_scale_aspect" type= "int" setter= "set_content_scale_aspect" getter= "get_content_scale_aspect" enum= "Window.ContentScaleAspect" default= "0" >
2022-06-11 03:58:48 +02:00
Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size].
2020-03-31 11:56:58 +02:00
</member>
2021-12-17 13:11:19 +01:00
<member name= "content_scale_factor" type= "float" setter= "set_content_scale_factor" getter= "get_content_scale_factor" default= "1.0" >
2022-06-11 03:58:48 +02:00
Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size].
2021-12-17 13:11:19 +01:00
</member>
2020-03-31 11:56:58 +02:00
<member name= "content_scale_mode" type= "int" setter= "set_content_scale_mode" getter= "get_content_scale_mode" enum= "Window.ContentScaleMode" default= "0" >
2022-06-11 03:58:48 +02:00
Specifies how the content is scaled when the [Window] is resized.
2020-03-31 11:56:58 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "content_scale_size" type= "Vector2i" setter= "set_content_scale_size" getter= "get_content_scale_size" default= "Vector2i(0, 0)" >
2022-06-11 03:58:48 +02:00
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.
2020-03-31 11:56:58 +02:00
</member>
2023-01-04 23:00:02 +01:00
<member name= "current_screen" type= "int" setter= "set_current_screen" getter= "get_current_screen" >
2021-07-05 15:43:51 +02:00
The screen the window is currently on.
2020-03-31 11:56:58 +02:00
</member>
<member name= "exclusive" type= "bool" setter= "set_exclusive" getter= "is_exclusive" default= "false" >
2022-06-11 03:58:48 +02:00
If [code]true[/code], the [Window] will be in exclusive mode. Exclusive windows are always on top of their parent and will block all input going to the parent [Window].
Needs [member transient] enabled to work.
2020-03-31 11:56:58 +02:00
</member>
2022-08-23 12:40:48 +02:00
<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>
2023-01-04 23:00:02 +01:00
<member name= "initial_position" type= "int" setter= "set_initial_position" getter= "get_initial_position" enum= "Window.WindowInitialPosition" default= "0" >
</member>
2019-09-24 19:45:03 +02:00
<member name= "max_size" type= "Vector2i" setter= "set_max_size" getter= "get_max_size" default= "Vector2i(0, 0)" >
2022-06-11 03:58:48 +02:00
If non-zero, the [Window] can't be resized to be bigger than this size.
2022-08-04 22:11:32 +02:00
[b]Note:[/b] This property will be ignored if the value is lower than [member min_size].
2020-03-31 11:56:58 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "min_size" type= "Vector2i" setter= "set_min_size" getter= "get_min_size" default= "Vector2i(0, 0)" >
2022-06-11 03:58:48 +02:00
If non-zero, the [Window] can't be resized to be smaller than this size.
2022-08-04 22:11:32 +02:00
[b]Note:[/b] This property will be ignored in favor of [method get_contents_minimum_size] if [member wrap_controls] is enabled and if its size is bigger.
2020-03-31 11:56:58 +02:00
</member>
<member name= "mode" type= "int" setter= "set_mode" getter= "get_mode" enum= "Window.Mode" default= "0" >
2021-07-05 15:43:51 +02:00
Set's the window's current mode.
2022-10-03 08:39:34 +02:00
[b]Note:[/b] Fullscreen mode is not exclusive full screen on Windows and Linux.
2020-03-31 11:56:58 +02:00
</member>
2023-01-15 11:05:25 +01:00
<member name= "mouse_passthrough" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
If [code]true[/code], all mouse event as passed to the underlying window of the same application. See also [member mouse_passthrough_polygon].
[b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows.
</member>
<member name= "mouse_passthrough_polygon" type= "PackedVector2Array" setter= "set_mouse_passthrough_polygon" getter= "get_mouse_passthrough_polygon" default= "PackedVector2Array()" >
Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
[codeblocks]
[gdscript]
# Set region, using Path2D node.
$Window.mouse_passthrough_polygon = $Path2D.curve.get_baked_points()
# Set region, using Polygon2D node.
$Window.mouse_passthrough_polygon = $Polygon2D.polygon
# Reset region to default.
$Window.mouse_passthrough_polygon = []
[/gdscript]
[csharp]
// Set region, using Path2D node.
GetNode< Window> ("Window").MousePassthrough = GetNode< Path2D> ("Path2D").Curve.GetBakedPoints();
// Set region, using Polygon2D node.
GetNode< Window> ("Window").MousePassthrough = GetNode< Polygon2D> ("Polygon2D").Polygon;
// Reset region to default.
GetNode< Window> ("Window").MousePassthrough = new Vector2[] {};
[/csharp]
[/codeblocks]
[b]Note:[/b] This property is ignored if [member mouse_passthrough] is set to [code]true[/code].
[b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
[b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows.
</member>
2022-02-24 10:21:23 +01:00
<member name= "popup_window" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2022-06-11 03:58:48 +02:00
If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled).
2022-02-24 10:21:23 +01:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "position" type= "Vector2i" setter= "set_position" getter= "get_position" default= "Vector2i(0, 0)" >
2021-07-05 15:43:51 +02:00
The window's position in pixels.
2020-03-31 11:56:58 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "size" type= "Vector2i" setter= "set_size" getter= "get_size" default= "Vector2i(100, 100)" >
2021-07-05 15:43:51 +02:00
The window's size in pixels.
2020-03-31 11:56:58 +02:00
</member>
<member name= "theme" type= "Theme" setter= "set_theme" getter= "get_theme" >
2022-11-29 21:01:45 +01:00
The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority.
[b]Note:[/b] [Window] styles will have no effect unless the window is embedded.
2020-03-31 11:56:58 +02:00
</member>
2021-07-04 22:42:23 +02:00
<member name= "theme_type_variation" type= "StringName" setter= "set_theme_type_variation" getter= "get_theme_type_variation" default= "&""" >
2022-06-11 03:58:48 +02:00
The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details.
2021-03-30 19:16:33 +02:00
</member>
2020-03-31 11:56:58 +02:00
<member name= "title" type= "String" setter= "set_title" getter= "get_title" default= """" >
2022-06-11 03:58:48 +02:00
The window's title. If the [Window] is non-embedded, title styles set in [Theme] will have no effect.
2020-03-31 11:56:58 +02:00
</member>
<member name= "transient" type= "bool" setter= "set_transient" getter= "is_transient" default= "false" >
2022-10-03 08:39:34 +02:00
If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
2022-06-11 03:58:48 +02:00
Note that behavior might be different depending on the platform.
2020-03-31 11:56:58 +02:00
</member>
<member name= "transparent" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2022-09-15 09:05:41 +02:00
If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows.
2022-10-03 08:39:34 +02:00
[b]Note:[/b] For native windows, this flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
[b]Note:[/b] Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
2020-03-31 11:56:58 +02:00
</member>
<member name= "unfocusable" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2022-06-11 03:58:48 +02:00
If [code]true[/code], the [Window] can't be focused nor interacted with. It can still be visible.
2020-03-31 11:56:58 +02:00
</member>
<member name= "unresizable" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2022-06-11 03:58:48 +02:00
If [code]true[/code], the window can't be resized. Minimize and maximize buttons are disabled.
2020-03-31 11:56:58 +02:00
</member>
<member name= "visible" type= "bool" setter= "set_visible" getter= "is_visible" default= "true" >
2021-07-05 15:43:51 +02:00
If [code]true[/code], the window is visible.
2020-03-31 11:56:58 +02:00
</member>
<member name= "wrap_controls" type= "bool" setter= "set_wrap_controls" getter= "is_wrapping_controls" default= "false" >
2022-08-04 22:11:32 +02:00
If [code]true[/code], the window's size will automatically update when a child node is added or removed, ignoring [member min_size] if the new size is bigger.
2022-06-11 03:58:48 +02:00
If [code]false[/code], you need to call [method child_controls_changed] manually.
2020-03-31 11:56:58 +02:00
</member>
</members>
<signals >
<signal name= "about_to_popup" >
<description >
2022-06-11 03:58:48 +02:00
Emitted right after [method popup] call, before the [Window] appears or does anything.
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "close_requested" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when the [Window]'s close button is pressed or when [member popup_window] is enabled and user clicks outside the window.
This signal can be used to handle window closing, e.g. by connecting it to [method hide].
2020-03-31 11:56:58 +02:00
</description>
</signal>
2023-01-23 20:39:29 +01:00
<signal name= "dpi_changed" >
<description >
Emitted when the [Window]'s DPI changes as a result of OS-level changes (e.g. moving the window from a Retina display to a lower resolution one).
[b]Note:[/b] Only implemented on macOS.
</description>
</signal>
2020-03-31 11:56:58 +02:00
<signal name= "files_dropped" >
2022-08-06 20:11:48 +02:00
<param index= "0" name= "files" type= "PackedStringArray" />
2020-03-31 11:56:58 +02:00
<description >
2022-02-27 17:24:50 +01:00
Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
2022-04-10 21:25:24 +02:00
Note that this method only works with non-embedded windows, i.e. the main window and [Window]-derived nodes when [member Viewport.gui_embed_subwindows] is disabled in the main viewport.
Example usage:
[codeblock]
func _ready():
get_viewport().files_dropped.connect(on_files_dropped)
func on_files_dropped(files):
print(files)
[/codeblock]
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "focus_entered" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when the [Window] gains focus.
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "focus_exited" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when the [Window] loses its focus.
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "go_back_requested" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after [constant Node.NOTIFICATION_WM_GO_BACK_REQUEST].
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "mouse_entered" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when the mouse cursor enters the [Window]'s area, regardless if it's currently focused or not.
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "mouse_exited" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when the mouse cursor exits the [Window]'s area (including when it's hovered over another window on top of this one).
2020-03-31 11:56:58 +02:00
</description>
</signal>
2022-01-19 08:59:42 +01:00
<signal name= "theme_changed" >
<description >
2022-07-08 21:29:36 +02:00
Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
2022-01-19 08:59:42 +01:00
</description>
</signal>
2022-09-22 11:06:11 +02:00
<signal name= "titlebar_changed" >
<description >
2022-10-03 08:39:34 +02:00
Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed.
2022-09-22 11:06:11 +02:00
</description>
</signal>
2020-03-31 11:56:58 +02:00
<signal name= "visibility_changed" >
<description >
2022-06-11 03:58:48 +02:00
Emitted when [Window] is made visible or disappears.
2020-03-31 11:56:58 +02:00
</description>
</signal>
<signal name= "window_input" >
2022-08-06 20:11:48 +02:00
<param index= "0" name= "event" type= "InputEvent" />
2020-03-31 11:56:58 +02:00
<description >
2022-09-09 17:19:30 +02:00
Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument. The event's position, if present, is in the embedder's coordinate system.
2020-03-31 11:56:58 +02:00
</description>
</signal>
</signals>
<constants >
<constant name= "NOTIFICATION_VISIBILITY_CHANGED" value= "30" >
2022-06-11 03:58:48 +02:00
Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
2020-03-31 11:56:58 +02:00
</constant>
2022-07-08 21:29:36 +02:00
<constant name= "NOTIFICATION_THEME_CHANGED" value= "32" >
Sent when the node needs to refresh its theme items. This happens in one of the following cases:
- The [member theme] property is changed on this node or any of its ancestors.
- The [member theme_type_variation] property is changed on this node.
- The node enters the scene tree.
[b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
</constant>
2020-03-31 11:56:58 +02:00
<constant name= "MODE_WINDOWED" value= "0" enum= "Mode" >
2022-10-03 08:39:34 +02:00
Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "MODE_MINIMIZED" value= "1" enum= "Mode" >
2022-10-03 08:39:34 +02:00
Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "MODE_MAXIMIZED" value= "2" enum= "Mode" >
2022-10-30 15:28:44 +01:00
Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "MODE_FULLSCREEN" value= "3" enum= "Mode" >
2022-10-03 08:39:34 +02:00
Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
2020-03-31 11:56:58 +02:00
</constant>
2022-01-28 10:19:53 +01:00
<constant name= "MODE_EXCLUSIVE_FULLSCREEN" value= "4" enum= "Mode" >
2022-10-03 08:39:34 +02:00
Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant MODE_FULLSCREEN].
Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence.
Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
2022-01-28 10:19:53 +01:00
</constant>
2020-03-31 11:56:58 +02:00
<constant name= "FLAG_RESIZE_DISABLED" value= "0" enum= "Flags" >
2022-10-03 08:39:34 +02:00
The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [member size]. This flag is ignored for full screen windows. Set with [member unresizable].
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "FLAG_BORDERLESS" value= "1" enum= "Flags" >
2022-10-03 08:39:34 +02:00
The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with [member borderless].
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "FLAG_ALWAYS_ON_TOP" value= "2" enum= "Flags" >
2022-10-03 08:39:34 +02:00
The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with [member always_on_top].
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "FLAG_TRANSPARENT" value= "3" enum= "Flags" >
2022-10-03 08:39:34 +02:00
The window background can be transparent.
[b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code]. Set with [member transparent].
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "FLAG_NO_FOCUS" value= "4" enum= "Flags" >
2022-10-03 08:39:34 +02:00
The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with [member unfocusable].
2020-03-31 11:56:58 +02:00
</constant>
2022-02-24 10:21:23 +01:00
<constant name= "FLAG_POPUP" value= "5" enum= "Flags" >
2022-10-03 08:39:34 +02:00
Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [member transient]).
2022-02-24 10:21:23 +01:00
</constant>
2022-08-23 12:40:48 +02:00
<constant name= "FLAG_EXTEND_TO_TITLE" value= "6" enum= "Flags" >
2022-10-03 08:39:34 +02:00
Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with [member extend_to_title].
[b]Note:[/b] This flag is implemented on macOS.
2022-08-23 12:40:48 +02:00
</constant>
2023-01-15 11:05:25 +01:00
<constant name= "FLAG_MOUSE_PASSTHROUGH" value= "7" enum= "Flags" >
2023-01-16 13:25:32 +01:00
All mouse events are passed to the underlying window of the same application.
2023-01-15 11:05:25 +01:00
</constant>
<constant name= "FLAG_MAX" value= "8" enum= "Flags" >
2022-06-11 03:58:48 +02:00
Max value of the [enum Flags].
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "CONTENT_SCALE_MODE_DISABLED" value= "0" enum= "ContentScaleMode" >
2022-06-11 03:58:48 +02:00
The content will not be scaled to match the [Window]'s size.
2020-03-31 11:56:58 +02:00
</constant>
2020-07-03 16:09:12 +02:00
<constant name= "CONTENT_SCALE_MODE_CANVAS_ITEMS" value= "1" enum= "ContentScaleMode" >
2022-06-11 03:58:48 +02:00
The content will be rendered at the target size. This is more performance-expensive than [constant CONTENT_SCALE_MODE_VIEWPORT], but provides better results.
2020-03-31 11:56:58 +02:00
</constant>
2020-07-03 16:09:12 +02:00
<constant name= "CONTENT_SCALE_MODE_VIEWPORT" value= "2" enum= "ContentScaleMode" >
2022-06-11 03:58:48 +02:00
The content will be rendered at the base size and then scaled to the target size. More performant than [constant CONTENT_SCALE_MODE_CANVAS_ITEMS], but results in pixelated image.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "CONTENT_SCALE_ASPECT_IGNORE" value= "0" enum= "ContentScaleAspect" >
2022-06-11 03:58:48 +02:00
The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "CONTENT_SCALE_ASPECT_KEEP" value= "1" enum= "ContentScaleAspect" >
2022-06-11 03:58:48 +02:00
The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "CONTENT_SCALE_ASPECT_KEEP_WIDTH" value= "2" enum= "ContentScaleAspect" >
2022-06-11 03:58:48 +02:00
The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value= "3" enum= "ContentScaleAspect" >
2022-06-11 03:58:48 +02:00
The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
2020-03-31 11:56:58 +02:00
</constant>
<constant name= "CONTENT_SCALE_ASPECT_EXPAND" value= "4" enum= "ContentScaleAspect" >
2022-06-11 03:58:48 +02:00
The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space.
2020-03-31 11:56:58 +02:00
</constant>
2020-08-12 13:49:10 +02:00
<constant name= "LAYOUT_DIRECTION_INHERITED" value= "0" enum= "LayoutDirection" >
2022-02-09 05:36:20 +01:00
Automatic layout direction, determined from the parent window layout direction.
2020-08-12 13:49:10 +02:00
</constant>
<constant name= "LAYOUT_DIRECTION_LOCALE" value= "1" enum= "LayoutDirection" >
Automatic layout direction, determined from the current locale.
</constant>
<constant name= "LAYOUT_DIRECTION_LTR" value= "2" enum= "LayoutDirection" >
Left-to-right layout direction.
</constant>
<constant name= "LAYOUT_DIRECTION_RTL" value= "3" enum= "LayoutDirection" >
Right-to-left layout direction.
</constant>
2023-01-04 23:00:02 +01:00
<constant name= "WINDOW_INITIAL_POSITION_ABSOLUTE" value= "0" enum= "WindowInitialPosition" >
2023-01-19 09:28:53 +01:00
Initial window position is determined by [member position].
2023-01-04 23:00:02 +01:00
</constant>
2023-01-19 09:28:53 +01:00
<constant name= "WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN" value= "1" enum= "WindowInitialPosition" >
Initial window position is a center of the primary screen.
</constant>
<constant name= "WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN" value= "2" enum= "WindowInitialPosition" >
Initial window position is a center of the main window screen.
</constant>
<constant name= "WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN" value= "3" enum= "WindowInitialPosition" >
Initial window position is a center of [member current_screen] screen.
2023-01-04 23:00:02 +01:00
</constant>
2020-03-31 11:56:58 +02:00
</constants>
<theme_items >
2021-12-30 17:22:06 +01:00
<theme_item name= "title_color" data_type= "color" type= "Color" default= "Color(0.875, 0.875, 0.875, 1)" >
2022-06-11 03:58:48 +02:00
The color of the title's text.
2020-03-31 11:56:58 +02:00
</theme_item>
2021-12-01 19:02:20 +01:00
<theme_item name= "title_outline_modulate" data_type= "color" type= "Color" default= "Color(1, 1, 1, 1)" >
2022-06-11 03:58:48 +02:00
The color of the title's text outline.
2020-03-31 11:56:58 +02:00
</theme_item>
2022-04-14 23:20:28 +02:00
<theme_item name= "close_h_offset" data_type= "constant" type= "int" default= "18" >
2022-06-11 03:58:48 +02:00
Horizontal position offset of the close button.
2020-03-31 11:56:58 +02:00
</theme_item>
2022-04-14 23:20:28 +02:00
<theme_item name= "close_v_offset" data_type= "constant" type= "int" default= "24" >
2022-06-11 03:58:48 +02:00
Vertical position offset of the close button.
2020-03-31 11:56:58 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "resize_margin" data_type= "constant" type= "int" default= "4" >
2022-06-11 03:58:48 +02:00
Defines the outside margin at which the window border can be grabbed with mouse and resized.
2020-03-31 11:56:58 +02:00
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "title_height" data_type= "constant" type= "int" default= "36" >
2022-06-11 03:58:48 +02:00
Height of the title bar.
2021-12-01 19:02:20 +01:00
</theme_item>
<theme_item name= "title_outline_size" data_type= "constant" type= "int" default= "0" >
The size of the title outline.
2020-03-31 11:56:58 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "title_font" data_type= "font" type= "Font" >
2022-06-11 03:58:48 +02:00
The font used to draw the title.
2020-03-31 11:56:58 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "title_font_size" data_type= "font_size" type= "int" >
2020-12-25 22:45:28 +01:00
The size of the title font.
</theme_item>
2021-12-01 19:02:20 +01:00
<theme_item name= "close" data_type= "icon" type= "Texture2D" >
2022-06-11 03:58:48 +02:00
The icon for the close button.
2020-03-31 11:56:58 +02:00
</theme_item>
2021-12-01 19:02:20 +01:00
<theme_item name= "close_pressed" data_type= "icon" type= "Texture2D" >
2022-06-11 03:58:48 +02:00
The icon for the close button when it's being pressed.
2020-12-25 22:45:28 +01:00
</theme_item>
2021-12-01 19:02:20 +01:00
<theme_item name= "embedded_border" data_type= "style" type= "StyleBox" >
2022-06-11 03:58:48 +02:00
The background style used when the [Window] is embedded. Note that this is drawn only under the window's content, excluding the title. For proper borders and title bar style, you can use [code]expand_margin_*[/code] properties of [StyleBoxFlat].
[b]Note:[/b] The content background will not be visible unless [member transparent] is enabled.
2020-12-25 22:45:28 +01:00
</theme_item>
2020-03-31 11:56:58 +02:00
</theme_items>
</class>