Merge pull request #37458 from akien-mga/doc-displayserver-window-sync
doc: Sync classref with DisplayServer/Window changes
This commit is contained in:
commit
047cdea7fa
31 changed files with 1772 additions and 1129 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -18,6 +18,7 @@ local.properties
|
||||||
.idea
|
.idea
|
||||||
.gradletasknamecache
|
.gradletasknamecache
|
||||||
project.properties
|
project.properties
|
||||||
|
platform/android/java/lib/.cxx/
|
||||||
platform/android/java/libs/*
|
platform/android/java/libs/*
|
||||||
platform/android/java/app/libs/*
|
platform/android/java/app/libs/*
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="AcceptDialog" inherits="WindowDialog" version="4.0">
|
<class name="AcceptDialog" inherits="Window" version="4.0">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Base dialog for user notification.
|
Base dialog for user notification.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
|
@ -67,9 +67,16 @@
|
||||||
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="""">
|
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="""">
|
||||||
The text displayed by the dialog.
|
The text displayed by the dialog.
|
||||||
</member>
|
</member>
|
||||||
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default=""Alert!"" />
|
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Alert!"" />
|
||||||
|
<member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
|
||||||
|
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
|
||||||
|
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
|
<signal name="cancelled">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
<signal name="confirmed">
|
<signal name="confirmed">
|
||||||
<description>
|
<description>
|
||||||
Emitted when the dialog is accepted, i.e. the OK button is pressed.
|
Emitted when the dialog is accepted, i.e. the OK button is pressed.
|
||||||
|
|
|
@ -22,8 +22,9 @@
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" override="true" default="Vector2( 200, 70 )" />
|
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i( 200, 70 )" />
|
||||||
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default=""Please Confirm..."" />
|
<member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i( 200, 100 )" />
|
||||||
|
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Please Confirm..."" />
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
</constants>
|
</constants>
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change.
|
Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change.
|
||||||
For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes.
|
For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes.
|
||||||
[b]User Interface nodes and input[/b]
|
[b]User Interface nodes and input[/b]
|
||||||
Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
|
Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [code]MainLoop._input_event[/code].
|
||||||
|
[b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
|
||||||
|
Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
|
||||||
Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
|
Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
|
||||||
Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
|
Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
|
||||||
[Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
|
[Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
<link>https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link>
|
<link>https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link>
|
||||||
|
@ -87,7 +89,7 @@
|
||||||
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
|
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_color_override">
|
<method name="add_theme_color_override">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -98,7 +100,7 @@
|
||||||
Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. If the [code]color[/code] is empty or invalid, the override is cleared and the color from assigned [Theme] is used.
|
Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. If the [code]color[/code] is empty or invalid, the override is cleared and the color from assigned [Theme] is used.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_constant_override">
|
<method name="add_theme_constant_override">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -109,7 +111,7 @@
|
||||||
Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is empty or invalid, the override is cleared and the constant from assigned [Theme] is used.
|
Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is empty or invalid, the override is cleared and the constant from assigned [Theme] is used.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_font_override">
|
<method name="add_theme_font_override">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -120,7 +122,7 @@
|
||||||
Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is empty or invalid, the override is cleared and the font from assigned [Theme] is used.
|
Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is empty or invalid, the override is cleared and the font from assigned [Theme] is used.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_icon_override">
|
<method name="add_theme_icon_override">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -131,7 +133,7 @@
|
||||||
Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is empty or invalid, the override is cleared and the icon from assigned [Theme] is used.
|
Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is empty or invalid, the override is cleared and the icon from assigned [Theme] is used.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_shader_override">
|
<method name="add_theme_shader_override">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -142,7 +144,7 @@
|
||||||
Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is empty or invalid, the override is cleared and the shader from assigned [Theme] is used.
|
Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is empty or invalid, the override is cleared and the shader from assigned [Theme] is used.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_stylebox_override">
|
<method name="add_theme_stylebox_override">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -217,21 +219,6 @@
|
||||||
Returns [member margin_left] and [member margin_top]. See also [member rect_position].
|
Returns [member margin_left] and [member margin_top]. See also [member rect_position].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_color" qualifiers="const">
|
|
||||||
<return type="Color">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
|
||||||
[codeblock]
|
|
||||||
func _ready():
|
|
||||||
modulate = get_color("font_color", "Button") #get the color defined for button fonts
|
|
||||||
[/codeblock]
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_combined_minimum_size" qualifiers="const">
|
<method name="get_combined_minimum_size" qualifiers="const">
|
||||||
<return type="Vector2">
|
<return type="Vector2">
|
||||||
</return>
|
</return>
|
||||||
|
@ -239,17 +226,6 @@
|
||||||
Returns combined minimum size from [member rect_min_size] and [method get_minimum_size].
|
Returns combined minimum size from [member rect_min_size] and [method get_minimum_size].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_constant" qualifiers="const">
|
|
||||||
<return type="int">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_cursor_shape" qualifiers="const">
|
<method name="get_cursor_shape" qualifiers="const">
|
||||||
<return type="int" enum="Control.CursorShape">
|
<return type="int" enum="Control.CursorShape">
|
||||||
</return>
|
</return>
|
||||||
|
@ -298,17 +274,6 @@
|
||||||
Returns the control that has the keyboard focus or [code]null[/code] if none.
|
Returns the control that has the keyboard focus or [code]null[/code] if none.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_font" qualifiers="const">
|
|
||||||
<return type="Font">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_global_rect" qualifiers="const">
|
<method name="get_global_rect" qualifiers="const">
|
||||||
<return type="Rect2">
|
<return type="Rect2">
|
||||||
</return>
|
</return>
|
||||||
|
@ -316,17 +281,6 @@
|
||||||
Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size].
|
Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_icon" qualifiers="const">
|
|
||||||
<return type="Texture2D">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_margin" qualifiers="const">
|
<method name="get_margin" qualifiers="const">
|
||||||
<return type="float">
|
<return type="float">
|
||||||
</return>
|
</return>
|
||||||
|
@ -371,7 +325,55 @@
|
||||||
Returns the rotation (in radians).
|
Returns the rotation (in radians).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_stylebox" qualifiers="const">
|
<method name="get_theme_color" qualifiers="const">
|
||||||
|
<return type="Color">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
||||||
|
[codeblock]
|
||||||
|
func _ready():
|
||||||
|
modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts
|
||||||
|
[/codeblock]
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_constant" qualifiers="const">
|
||||||
|
<return type="int">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_font" qualifiers="const">
|
||||||
|
<return type="Font">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_icon" qualifiers="const">
|
||||||
|
<return type="Texture2D">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_stylebox" qualifiers="const">
|
||||||
<return type="StyleBox">
|
<return type="StyleBox">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -409,46 +411,6 @@
|
||||||
Steal the focus from another control and become the focused control (see [member focus_mode]).
|
Steal the focus from another control and become the focused control (see [member focus_mode]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_color" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_color_override" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_constant" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_constant_override" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_focus" qualifiers="const">
|
<method name="has_focus" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -456,46 +418,6 @@
|
||||||
Returns [code]true[/code] if this is the current focused control. See [member focus_mode].
|
Returns [code]true[/code] if this is the current focused control. See [member focus_mode].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_font" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_font_override" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_icon" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="type" type="StringName" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_icon_override" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="name" type="StringName">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_point" qualifiers="virtual">
|
<method name="has_point" qualifiers="virtual">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -507,7 +429,87 @@
|
||||||
[b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
|
[b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_shader_override" qualifiers="const">
|
<method name="has_theme_color" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_color_override" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_constant" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_constant_override" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_font" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_font_override" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_icon" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_icon_override" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_shader_override" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -516,7 +518,7 @@
|
||||||
Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node.
|
Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_stylebox" qualifiers="const">
|
<method name="has_theme_stylebox" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -527,7 +529,7 @@
|
||||||
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_stylebox_override" qualifiers="const">
|
<method name="has_theme_stylebox_override" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="name" type="StringName">
|
<argument index="0" name="name" type="StringName">
|
||||||
|
@ -757,16 +759,6 @@
|
||||||
If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins.
|
If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="show_modal">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="exclusive" type="bool" default="false">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Displays a control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.
|
|
||||||
If [code]exclusive[/code] is [code]true[/code], other controls will not receive input and clicking outside this control will not close it.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="warp_mouse">
|
<method name="warp_mouse">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -905,11 +897,6 @@
|
||||||
Emitted when the node's minimum size changes.
|
Emitted when the node's minimum size changes.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="modal_closed">
|
|
||||||
<description>
|
|
||||||
Emitted when a modal [Control] is closed. See [method show_modal].
|
|
||||||
</description>
|
|
||||||
</signal>
|
|
||||||
<signal name="mouse_entered">
|
<signal name="mouse_entered">
|
||||||
<description>
|
<description>
|
||||||
Emitted when the mouse enters the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it.
|
Emitted when the mouse enters the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it.
|
||||||
|
@ -930,6 +917,10 @@
|
||||||
Emitted when one of the size flags changes. See [member size_flags_horizontal] and [member size_flags_vertical].
|
Emitted when one of the size flags changes. See [member size_flags_horizontal] and [member size_flags_vertical].
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
|
<signal name="theme_changed">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="FOCUS_NONE" value="0" enum="FocusMode">
|
<constant name="FOCUS_NONE" value="0" enum="FocusMode">
|
||||||
|
@ -957,10 +948,7 @@
|
||||||
Sent when the node loses focus.
|
Sent when the node loses focus.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
|
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
|
||||||
Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] methods.
|
Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_theme_*_override[/code] methods.
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_MODAL_CLOSE" value="46">
|
|
||||||
Sent when an open modal dialog closes. See [method show_modal].
|
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_SCROLL_BEGIN" value="47">
|
<constant name="NOTIFICATION_SCROLL_BEGIN" value="47">
|
||||||
Sent when this node is inside a [ScrollContainer] which has begun being scrolled.
|
Sent when this node is inside a [ScrollContainer] which has begun being scrolled.
|
||||||
|
|
1059
doc/classes/DisplayServer.xml
Normal file
1059
doc/classes/DisplayServer.xml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -60,14 +60,13 @@
|
||||||
<member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode" default="0">
|
<member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode" default="0">
|
||||||
The view format in which the [EditorFileDialog] displays resources to the user.
|
The view format in which the [EditorFileDialog] displays resources to the user.
|
||||||
</member>
|
</member>
|
||||||
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="EditorFileDialog.Mode" default="4">
|
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="EditorFileDialog.FileMode" default="4">
|
||||||
The purpose of the [EditorFileDialog], which defines the allowed behaviors.
|
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
|
||||||
</member>
|
</member>
|
||||||
<member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" override="true" default="true" />
|
|
||||||
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
|
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
|
||||||
If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
|
If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
|
||||||
</member>
|
</member>
|
||||||
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default=""Save a File"" />
|
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Save a File"" />
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="dir_selected">
|
<signal name="dir_selected">
|
||||||
|
@ -93,19 +92,19 @@
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="MODE_OPEN_FILE" value="0" enum="Mode">
|
<constant name="FILE_MODE_OPEN_FILE" value="0" enum="FileMode">
|
||||||
The [EditorFileDialog] can select only one file. Accepting the window will open the file.
|
The [EditorFileDialog] can select only one file. Accepting the window will open the file.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_FILES" value="1" enum="Mode">
|
<constant name="FILE_MODE_OPEN_FILES" value="1" enum="FileMode">
|
||||||
The [EditorFileDialog] can select multiple files. Accepting the window will open all files.
|
The [EditorFileDialog] can select multiple files. Accepting the window will open all files.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_DIR" value="2" enum="Mode">
|
<constant name="FILE_MODE_OPEN_DIR" value="2" enum="FileMode">
|
||||||
The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.
|
The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_ANY" value="3" enum="Mode">
|
<constant name="FILE_MODE_OPEN_ANY" value="3" enum="FileMode">
|
||||||
The [EditorFileDialog] can select a file or directory. Accepting the window will open it.
|
The [EditorFileDialog] can select a file or directory. Accepting the window will open it.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_SAVE_FILE" value="4" enum="Mode">
|
<constant name="FILE_MODE_SAVE_FILE" value="4" enum="FileMode">
|
||||||
The [EditorFileDialog] can select only one file. Accepting the window will save the file.
|
The [EditorFileDialog] can select only one file. Accepting the window will save the file.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
|
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
|
||||||
|
|
|
@ -137,10 +137,6 @@
|
||||||
<member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false">
|
<member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false">
|
||||||
Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life.
|
Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life.
|
||||||
</member>
|
</member>
|
||||||
<member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false">
|
|
||||||
Smooths out the blockiness created by sampling higher levels, at the cost of performance.
|
|
||||||
[b]Note:[/b] When using the GLES2 renderer, this is only available if the GPU supports the [code]GL_EXT_gpu_shader4[/code] extension.
|
|
||||||
</member>
|
|
||||||
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2">
|
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2">
|
||||||
The glow blending mode.
|
The glow blending mode.
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -68,19 +68,19 @@
|
||||||
The currently selected file path of the file dialog.
|
The currently selected file path of the file dialog.
|
||||||
</member>
|
</member>
|
||||||
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
|
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
|
||||||
|
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4">
|
||||||
|
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
|
||||||
|
</member>
|
||||||
<member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )">
|
<member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )">
|
||||||
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
|
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
|
||||||
</member>
|
</member>
|
||||||
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4">
|
|
||||||
The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants.
|
|
||||||
</member>
|
|
||||||
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
|
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
|
||||||
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to "Open a File").
|
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
|
||||||
</member>
|
</member>
|
||||||
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
|
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
|
||||||
If [code]true[/code], the dialog will show hidden files.
|
If [code]true[/code], the dialog will show hidden files.
|
||||||
</member>
|
</member>
|
||||||
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default=""Save a File"" />
|
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Save a File"" />
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="dir_selected">
|
<signal name="dir_selected">
|
||||||
|
@ -106,19 +106,19 @@
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="MODE_OPEN_FILE" value="0" enum="Mode">
|
<constant name="FILE_MODE_OPEN_FILE" value="0" enum="FileMode">
|
||||||
The dialog allows selecting one, and only one file.
|
The dialog allows selecting one, and only one file.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_FILES" value="1" enum="Mode">
|
<constant name="FILE_MODE_OPEN_FILES" value="1" enum="FileMode">
|
||||||
The dialog allows selecting multiple files.
|
The dialog allows selecting multiple files.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_DIR" value="2" enum="Mode">
|
<constant name="FILE_MODE_OPEN_DIR" value="2" enum="FileMode">
|
||||||
The dialog only allows selecting a directory, disallowing the selection of any file.
|
The dialog only allows selecting a directory, disallowing the selection of any file.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_ANY" value="3" enum="Mode">
|
<constant name="FILE_MODE_OPEN_ANY" value="3" enum="FileMode">
|
||||||
The dialog allows selecting one file or directory.
|
The dialog allows selecting one file or directory.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_SAVE_FILE" value="4" enum="Mode">
|
<constant name="FILE_MODE_SAVE_FILE" value="4" enum="FileMode">
|
||||||
The dialog will warn when a file exists.
|
The dialog will warn when a file exists.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
|
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
|
If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
|
||||||
</member>
|
</member>
|
||||||
<member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0">
|
<member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0">
|
||||||
The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information.
|
The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method Window.set_ime_active] for more information.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
[MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree.
|
[MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree.
|
||||||
Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation.
|
Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation.
|
||||||
Here is an example script implementing a simple [MainLoop]:
|
Here is an example script implementing a simple [MainLoop]:
|
||||||
|
[b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
extends MainLoop
|
extends MainLoop
|
||||||
|
|
||||||
|
@ -43,17 +44,6 @@
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="_drop_files" qualifiers="virtual">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="files" type="PackedStringArray">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="from_screen" type="int">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Called when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="_finalize" qualifiers="virtual">
|
<method name="_finalize" qualifiers="virtual">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -61,17 +51,6 @@
|
||||||
Called before the program exits.
|
Called before the program exits.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="_global_menu_action" qualifiers="virtual">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="id" type="Variant">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="meta" type="Variant">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar).
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="_idle" qualifiers="virtual">
|
<method name="_idle" qualifiers="virtual">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -89,24 +68,6 @@
|
||||||
Called once during initialization.
|
Called once during initialization.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="_input_event" qualifiers="virtual">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="event" type="InputEvent">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Called whenever an [InputEvent] is received by the main loop.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="_input_text" qualifiers="virtual">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="text" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Deprecated callback, does not do anything. Use [method _input_event] to parse text input. Will be removed in Godot 4.0.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="_iteration" qualifiers="virtual">
|
<method name="_iteration" qualifiers="virtual">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -140,24 +101,6 @@
|
||||||
Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0.
|
Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="input_event">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="event" type="InputEvent">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="input_text">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="text" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="iteration">
|
<method name="iteration">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -180,58 +123,30 @@
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
|
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
|
||||||
Notification received from the OS when the mouse enters the game window.
|
|
||||||
Implemented on desktop and web platforms.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_WM_MOUSE_EXIT" value="1003">
|
|
||||||
Notification received from the OS when the mouse leaves the game window.
|
|
||||||
Implemented on desktop and web platforms.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_WM_FOCUS_IN" value="1004">
|
|
||||||
Notification received from the OS when the game window is focused.
|
|
||||||
Implemented on all platforms.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005">
|
|
||||||
Notification received from the OS when the game window is unfocused.
|
|
||||||
Implemented on all platforms.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
|
|
||||||
Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
|
|
||||||
Implemented on desktop platforms.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
|
|
||||||
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
|
|
||||||
Specific to the Android platform.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
|
|
||||||
Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
|
|
||||||
No supported platforms currently send this notification.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
|
|
||||||
Notification received from the OS when the application is exceeding its allocated memory.
|
Notification received from the OS when the application is exceeding its allocated memory.
|
||||||
Specific to the iOS platform.
|
Specific to the iOS platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
|
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010">
|
||||||
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
|
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_WM_ABOUT" value="1011">
|
<constant name="NOTIFICATION_WM_ABOUT" value="2011">
|
||||||
Notification received from the OS when a request for "About" information is sent.
|
Notification received from the OS when a request for "About" information is sent.
|
||||||
Specific to the macOS platform.
|
Specific to the macOS platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_CRASH" value="1012">
|
<constant name="NOTIFICATION_CRASH" value="2012">
|
||||||
Notification received from Godot's crash handler when the engine is about to crash.
|
Notification received from Godot's crash handler when the engine is about to crash.
|
||||||
Implemented on desktop platforms if the crash handler is enabled.
|
Implemented on desktop platforms if the crash handler is enabled.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
|
<constant name="NOTIFICATION_OS_IME_UPDATE" value="2013">
|
||||||
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
|
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
|
||||||
Specific to the macOS platform.
|
Specific to the macOS platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_APP_RESUMED" value="1014">
|
<constant name="NOTIFICATION_APP_RESUMED" value="2014">
|
||||||
Notification received from the OS when the app is resumed.
|
Notification received from the OS when the app is resumed.
|
||||||
Specific to the Android platform.
|
Specific to the Android platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_APP_PAUSED" value="1015">
|
<constant name="NOTIFICATION_APP_PAUSED" value="2015">
|
||||||
Notification received from the OS when the app is paused.
|
Notification received from the OS when the app is paused.
|
||||||
Specific to the Android platform.
|
Specific to the Android platform.
|
||||||
</constant>
|
</constant>
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
|
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="about_to_show">
|
<signal name="about_to_popup">
|
||||||
<description>
|
<description>
|
||||||
Emitted when [PopupMenu] of this MenuButton is about to show.
|
Emitted when the [PopupMenu] of this MenuButton is about to show.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<description>
|
<description>
|
||||||
Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
|
Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
|
||||||
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input].
|
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input].
|
||||||
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
|
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
|
||||||
For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first.
|
For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
<description>
|
<description>
|
||||||
Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
|
Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
|
||||||
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
|
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
|
||||||
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
|
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
|
||||||
For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
|
For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
<description>
|
<description>
|
||||||
Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
|
Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
|
||||||
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
|
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
|
||||||
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
|
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
|
||||||
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
|
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -938,42 +938,40 @@
|
||||||
Notification received from the OS when the game window is unfocused.
|
Notification received from the OS when the game window is unfocused.
|
||||||
Implemented on all platforms.
|
Implemented on all platforms.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
|
<constant name="NOTIFICATION_WM_CLOSE_REQUEST" value="1006">
|
||||||
Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
|
Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or Alt+F4).
|
||||||
Implemented on desktop platforms.
|
Implemented on desktop platforms.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
|
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
|
||||||
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
|
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
|
||||||
Specific to the Android platform.
|
Specific to the Android platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
|
<constant name="NOTIFICATION_WM_SIZE_CHANGED" value="1008">
|
||||||
Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
|
|
||||||
No supported platforms currently send this notification.
|
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
|
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
|
||||||
Notification received from the OS when the application is exceeding its allocated memory.
|
Notification received from the OS when the application is exceeding its allocated memory.
|
||||||
Specific to the iOS platform.
|
Specific to the iOS platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
|
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010">
|
||||||
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
|
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_WM_ABOUT" value="1011">
|
<constant name="NOTIFICATION_WM_ABOUT" value="2011">
|
||||||
Notification received from the OS when a request for "About" information is sent.
|
Notification received from the OS when a request for "About" information is sent.
|
||||||
Specific to the macOS platform.
|
Specific to the macOS platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_CRASH" value="1012">
|
<constant name="NOTIFICATION_CRASH" value="2012">
|
||||||
Notification received from Godot's crash handler when the engine is about to crash.
|
Notification received from Godot's crash handler when the engine is about to crash.
|
||||||
Implemented on desktop platforms if the crash handler is enabled.
|
Implemented on desktop platforms if the crash handler is enabled.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
|
<constant name="NOTIFICATION_OS_IME_UPDATE" value="2013">
|
||||||
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
|
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
|
||||||
Specific to the macOS platform.
|
Specific to the macOS platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_APP_RESUMED" value="1014">
|
<constant name="NOTIFICATION_APP_RESUMED" value="2014">
|
||||||
Notification received from the OS when the app is resumed.
|
Notification received from the OS when the app is resumed.
|
||||||
Specific to the Android platform.
|
Specific to the Android platform.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="NOTIFICATION_APP_PAUSED" value="1015">
|
<constant name="NOTIFICATION_APP_PAUSED" value="2015">
|
||||||
Notification received from the OS when the app is paused.
|
Notification received from the OS when the app is paused.
|
||||||
Specific to the Android platform.
|
Specific to the Android platform.
|
||||||
</constant>
|
</constant>
|
||||||
|
|
|
@ -9,24 +9,6 @@
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="alert">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="text" type="String">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="title" type="String" default=""Alert!"">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="can_draw" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the host OS allows drawing.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="can_use_threads" qualifiers="const">
|
<method name="can_use_threads" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -34,13 +16,6 @@
|
||||||
Returns [code]true[/code] if the current host platform is using multiple threads.
|
Returns [code]true[/code] if the current host platform is using multiple threads.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="center_window">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Centers the window on the screen if in windowed mode.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="close_midi_inputs">
|
<method name="close_midi_inputs">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -133,22 +108,6 @@
|
||||||
Returns the keycode of the given string (e.g. "Escape").
|
Returns the keycode of the given string (e.g. "Escape").
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_audio_driver_count" qualifiers="const">
|
|
||||||
<return type="int">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the total number of available audio drivers.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_audio_driver_name" qualifiers="const">
|
|
||||||
<return type="String">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="driver" type="int">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns the audio driver name for the given index.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_cmdline_args">
|
<method name="get_cmdline_args">
|
||||||
<return type="PackedStringArray">
|
<return type="PackedStringArray">
|
||||||
</return>
|
</return>
|
||||||
|
@ -165,13 +124,6 @@
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_current_video_driver" qualifiers="const">
|
|
||||||
<return type="int" enum="OS.VideoDriver">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the currently used video driver, using one of the values from [enum VideoDriver].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_date" qualifiers="const">
|
<method name="get_date" qualifiers="const">
|
||||||
<return type="Dictionary">
|
<return type="Dictionary">
|
||||||
</return>
|
</return>
|
||||||
|
@ -224,24 +176,6 @@
|
||||||
[b]Note:[/b] This method is implemented on Android.
|
[b]Note:[/b] This method is implemented on Android.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_ime_selection" qualifiers="const">
|
|
||||||
<return type="Vector2">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.
|
|
||||||
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_ime_text" qualifiers="const">
|
|
||||||
<return type="String">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the IME intermediate composition string.
|
|
||||||
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_keycode_string" qualifiers="const">
|
<method name="get_keycode_string" qualifiers="const">
|
||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
|
@ -252,15 +186,6 @@
|
||||||
See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
|
See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_latin_keyboard_variant" qualifiers="const">
|
|
||||||
<return type="String">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the current latin keyboard variant as a String.
|
|
||||||
Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code].
|
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_locale" qualifiers="const">
|
<method name="get_locale" qualifiers="const">
|
||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
|
@ -298,57 +223,6 @@
|
||||||
Returns the number of threads available on the host machine.
|
Returns the number of threads available on the host machine.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_real_window_size" qualifiers="const">
|
|
||||||
<return type="Vector2">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the window size including decorations like window borders.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_screen_count" qualifiers="const">
|
|
||||||
<return type="int">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the number of displays attached to the host machine.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_screen_dpi" qualifiers="const">
|
|
||||||
<return type="int">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="screen" type="int" default="-1">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used.
|
|
||||||
On Android devices, the actual screen densities are grouped into six generalized densities:
|
|
||||||
[codeblock]
|
|
||||||
ldpi - 120 dpi
|
|
||||||
mdpi - 160 dpi
|
|
||||||
hdpi - 240 dpi
|
|
||||||
xhdpi - 320 dpi
|
|
||||||
xxhdpi - 480 dpi
|
|
||||||
xxxhdpi - 640 dpi
|
|
||||||
[/codeblock]
|
|
||||||
[b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_screen_position" qualifiers="const">
|
|
||||||
<return type="Vector2">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="screen" type="int" default="-1">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns the position of the specified screen by index. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_screen_size" qualifiers="const">
|
|
||||||
<return type="Vector2">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="screen" type="int" default="-1">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns the dimensions in pixels of the specified screen. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_splash_tick_msec" qualifiers="const">
|
<method name="get_splash_tick_msec" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
|
@ -461,84 +335,6 @@
|
||||||
If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
|
If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_video_driver_count" qualifiers="const">
|
|
||||||
<return type="int">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the number of video drivers supported on the current platform.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_video_driver_name" qualifiers="const">
|
|
||||||
<return type="String">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="driver" type="int" enum="OS.VideoDriver">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_virtual_keyboard_height">
|
|
||||||
<return type="int">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_window_safe_area" qualifiers="const">
|
|
||||||
<return type="Rect2">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns unobscured area of the window where interactive controls should be rendered.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="global_menu_add_item">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="menu" type="String">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="label" type="String">
|
|
||||||
</argument>
|
|
||||||
<argument index="2" name="id" type="Variant">
|
|
||||||
</argument>
|
|
||||||
<argument index="3" name="meta" type="Variant">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="global_menu_add_separator">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="menu" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Add a separator between items. Separators also occupy an index.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="global_menu_clear">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="menu" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Clear the global menu, in effect removing all items.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="global_menu_remove_item">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="menu" type="String">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="idx" type="int">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_environment" qualifiers="const">
|
<method name="has_environment" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -558,27 +354,6 @@
|
||||||
[b]Note:[/b] Tag names are case-sensitive.
|
[b]Note:[/b] Tag names are case-sensitive.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_touchscreen_ui_hint" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the device has a touchscreen or emulates one.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="has_virtual_keyboard" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the platform has a virtual keyboard, [code]false[/code] otherwise.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="hide_virtual_keyboard">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Hides the virtual keyboard if it is shown, does nothing otherwise.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="is_debug_build" qualifiers="const">
|
<method name="is_debug_build" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -597,13 +372,6 @@
|
||||||
Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
|
Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_ok_left_and_cancel_right" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="is_stdout_verbose" qualifiers="const">
|
<method name="is_stdout_verbose" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -618,21 +386,6 @@
|
||||||
If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable.
|
If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_window_always_on_top" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the window should always be on top of other windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="is_window_focused" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the window is currently focused.
|
|
||||||
[b]Note:[/b] Only implemented on desktop platforms. On other platforms, it will always return [code]true[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="kill">
|
<method name="kill">
|
||||||
<return type="int" enum="Error">
|
<return type="int" enum="Error">
|
||||||
</return>
|
</return>
|
||||||
|
@ -644,62 +397,6 @@
|
||||||
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
|
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="move_window_to_foreground">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Moves the window to the front.
|
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="native_video_is_playing">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if native video is playing.
|
|
||||||
[b]Note:[/b] This method is implemented on Android and iOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="native_video_pause">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Pauses native video playback.
|
|
||||||
[b]Note:[/b] This method is implemented on Android and iOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="native_video_play">
|
|
||||||
<return type="int" enum="Error">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="path" type="String">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="volume" type="float">
|
|
||||||
</argument>
|
|
||||||
<argument index="2" name="audio_track" type="String">
|
|
||||||
</argument>
|
|
||||||
<argument index="3" name="subtitle_track" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Plays native video from the specified path, at the given volume and with audio and subtitle tracks.
|
|
||||||
[b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="native_video_stop">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Stops native video playback.
|
|
||||||
[b]Note:[/b] This method is implemented on Android and iOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="native_video_unpause">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Resumes native video playback.
|
|
||||||
[b]Note:[/b] This method is implemented on Android and iOS.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="open_midi_inputs">
|
<method name="open_midi_inputs">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -742,14 +439,6 @@
|
||||||
Shows all resources currently used by the game.
|
Shows all resources currently used by the game.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="request_attention">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
|
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="request_permission">
|
<method name="request_permission">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -767,51 +456,6 @@
|
||||||
[b]Note:[/b] This method is implemented on Android.
|
[b]Note:[/b] This method is implemented on Android.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_icon">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="icon" type="Image">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets the game's icon using an [Image] resource.
|
|
||||||
The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed.
|
|
||||||
[b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_ime_active">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="active" type="bool">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets whether IME input mode should be enabled.
|
|
||||||
If active IME handles key events before the application and creates an composition string and suggestion list.
|
|
||||||
Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions.
|
|
||||||
Completed composition string is committed when input is finished.
|
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_ime_position">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="position" type="Vector2">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets position of IME suggestion list popup (in window coordinates).
|
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_native_icon">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="filename" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS).
|
|
||||||
Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog.
|
|
||||||
[b]Note:[/b] This method is implemented on macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_thread_name">
|
<method name="set_thread_name">
|
||||||
<return type="int" enum="Error">
|
<return type="int" enum="Error">
|
||||||
</return>
|
</return>
|
||||||
|
@ -830,27 +474,6 @@
|
||||||
Enables backup saves if [code]enabled[/code] is [code]true[/code].
|
Enables backup saves if [code]enabled[/code] is [code]true[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_window_always_on_top">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="enabled" type="bool">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets whether the window should always be on top.
|
|
||||||
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_window_title">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="title" type="String">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets the window title to the specified string.
|
|
||||||
[b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers.
|
|
||||||
[b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="shell_open">
|
<method name="shell_open">
|
||||||
<return type="int" enum="Error">
|
<return type="int" enum="Error">
|
||||||
</return>
|
</return>
|
||||||
|
@ -864,82 +487,18 @@
|
||||||
[b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
|
[b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="show_virtual_keyboard">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="existing_text" type="String" default="""">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
|
|
||||||
[b]Note:[/b] This method is implemented on Android, iOS and UWP.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="clipboard" type="String" setter="set_clipboard" getter="get_clipboard" default="""">
|
|
||||||
The clipboard from the host OS. Might be unavailable on some platforms.
|
|
||||||
</member>
|
|
||||||
<member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
|
|
||||||
The current screen index (starting from 0).
|
|
||||||
</member>
|
|
||||||
<member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0">
|
<member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0">
|
||||||
The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).
|
The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).
|
||||||
[b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed.
|
[b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed.
|
||||||
</member>
|
</member>
|
||||||
<member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on" default="true">
|
|
||||||
If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile.
|
|
||||||
</member>
|
|
||||||
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false">
|
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false">
|
||||||
If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
|
If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
|
||||||
</member>
|
</member>
|
||||||
<member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900">
|
<member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900">
|
||||||
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
|
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
|
||||||
</member>
|
</member>
|
||||||
<member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size" default="Vector2( 0, 0 )">
|
|
||||||
The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
|
|
||||||
</member>
|
|
||||||
<member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size" default="Vector2( 0, 0 )">
|
|
||||||
The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
|
|
||||||
</member>
|
|
||||||
<member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation" default="0">
|
|
||||||
The current screen orientation.
|
|
||||||
</member>
|
|
||||||
<member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true">
|
|
||||||
If [code]true[/code], vertical synchronization (Vsync) is enabled.
|
|
||||||
</member>
|
|
||||||
<member name="vsync_via_compositor" type="bool" setter="set_vsync_via_compositor" getter="is_vsync_via_compositor_enabled" default="false">
|
|
||||||
If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode.
|
|
||||||
[b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.
|
|
||||||
[b]Note:[/b] This property is only implemented on Windows.
|
|
||||||
</member>
|
|
||||||
<member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false">
|
|
||||||
If [code]true[/code], removes the window frame.
|
|
||||||
[b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency.
|
|
||||||
</member>
|
|
||||||
<member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen" default="false">
|
|
||||||
If [code]true[/code], the window is fullscreen.
|
|
||||||
</member>
|
|
||||||
<member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized" default="false">
|
|
||||||
If [code]true[/code], the window is maximized.
|
|
||||||
</member>
|
|
||||||
<member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized" default="false">
|
|
||||||
If [code]true[/code], the window is minimized.
|
|
||||||
</member>
|
|
||||||
<member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled" default="false">
|
|
||||||
If [code]true[/code], the window background is transparent and window frame is removed.
|
|
||||||
Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering.
|
|
||||||
[b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled.
|
|
||||||
[b]Note:[/b] This property is implemented on HTML5, Linux, macOS and Windows.
|
|
||||||
</member>
|
|
||||||
<member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )">
|
|
||||||
The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
|
|
||||||
</member>
|
|
||||||
<member name="window_resizable" type="bool" setter="set_window_resizable" getter="is_window_resizable" default="true">
|
|
||||||
If [code]true[/code], the window is resizable by the user.
|
|
||||||
</member>
|
|
||||||
<member name="window_size" type="Vector2" setter="set_window_size" getter="get_window_size" default="Vector2( 0, 0 )">
|
|
||||||
The size of the window (without counting window manager decorations).
|
|
||||||
</member>
|
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
|
<constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
|
||||||
|
@ -1005,27 +564,6 @@
|
||||||
<constant name="MONTH_DECEMBER" value="12" enum="Month">
|
<constant name="MONTH_DECEMBER" value="12" enum="Month">
|
||||||
December.
|
December.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0" enum="ScreenOrientation">
|
|
||||||
Landscape screen orientation.
|
|
||||||
</constant>
|
|
||||||
<constant name="SCREEN_ORIENTATION_PORTRAIT" value="1" enum="ScreenOrientation">
|
|
||||||
Portrait screen orientation.
|
|
||||||
</constant>
|
|
||||||
<constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
|
|
||||||
Reverse landscape screen orientation.
|
|
||||||
</constant>
|
|
||||||
<constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation">
|
|
||||||
Reverse portrait screen orientation.
|
|
||||||
</constant>
|
|
||||||
<constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation">
|
|
||||||
Uses landscape or reverse landscape based on the hardware sensor.
|
|
||||||
</constant>
|
|
||||||
<constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation">
|
|
||||||
Uses portrait or reverse portrait based on the hardware sensor.
|
|
||||||
</constant>
|
|
||||||
<constant name="SCREEN_ORIENTATION_SENSOR" value="6" enum="ScreenOrientation">
|
|
||||||
Uses most suitable orientation based on the hardware sensor.
|
|
||||||
</constant>
|
|
||||||
<constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir">
|
<constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir">
|
||||||
Desktop directory path.
|
Desktop directory path.
|
||||||
</constant>
|
</constant>
|
||||||
|
|
|
@ -10,11 +10,21 @@
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<methods>
|
<methods>
|
||||||
</methods>
|
</methods>
|
||||||
|
<members>
|
||||||
|
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Panel.Mode" default="0">
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
<constant name="MODE_BACKGROUND" value="0" enum="Mode">
|
||||||
|
</constant>
|
||||||
|
<constant name="MODE_FOREGROUND" value="1" enum="Mode">
|
||||||
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
<theme_items>
|
<theme_items>
|
||||||
<theme_item name="panel" type="StyleBox">
|
<theme_item name="panel" type="StyleBox">
|
||||||
The style of this [Panel].
|
The style of this [Panel].
|
||||||
</theme_item>
|
</theme_item>
|
||||||
|
<theme_item name="panel_fg" type="StyleBox">
|
||||||
|
</theme_item>
|
||||||
</theme_items>
|
</theme_items>
|
||||||
</class>
|
</class>
|
||||||
|
|
|
@ -1,81 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="Popup" inherits="Control" version="4.0">
|
<class name="Popup" inherits="Window" version="4.0">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Base container control for popups and dialogs.
|
Base container control for popups and dialogs.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport.
|
Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="popup">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Popup (show the control in modal form).
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="popup_centered">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by [code]size[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="popup_centered_clamped">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="fallback_ratio" type="float" default="0.75">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to [code]size[/code], then ensuring the popup is no larger than the viewport size multiplied by [code]fallback_ratio[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="popup_centered_minsize">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="popup_centered_ratio">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="ratio" type="float" default="0.75">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_as_minsize">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Shrink popup to keep to the minimum size of content.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
|
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
|
||||||
If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
|
<member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
|
||||||
</member>
|
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
|
||||||
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
|
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
|
||||||
|
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="about_to_show">
|
|
||||||
<description>
|
|
||||||
Emitted when a popup is about to be shown. This is often used in [PopupMenu] to clear the list of options then create a new one according to the current context.
|
|
||||||
</description>
|
|
||||||
</signal>
|
|
||||||
<signal name="popup_hide">
|
<signal name="popup_hide">
|
||||||
<description>
|
<description>
|
||||||
Emitted when a popup is hidden.
|
Emitted when a popup is hidden.
|
||||||
|
@ -83,11 +25,5 @@
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="NOTIFICATION_POST_POPUP" value="80">
|
|
||||||
Notification sent right after the popup is shown.
|
|
||||||
</constant>
|
|
||||||
<constant name="NOTIFICATION_POPUP_HIDE" value="81">
|
|
||||||
Notification sent right after the popup is hidden.
|
|
||||||
</constant>
|
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<class name="PopupDialog" inherits="Popup" version="4.0">
|
|
||||||
<brief_description>
|
|
||||||
Base class for popup dialogs.
|
|
||||||
</brief_description>
|
|
||||||
<description>
|
|
||||||
PopupDialog is a base class for popup dialogs, along with [WindowDialog].
|
|
||||||
</description>
|
|
||||||
<tutorials>
|
|
||||||
</tutorials>
|
|
||||||
<methods>
|
|
||||||
</methods>
|
|
||||||
<constants>
|
|
||||||
</constants>
|
|
||||||
<theme_items>
|
|
||||||
<theme_item name="panel" type="StyleBox">
|
|
||||||
Sets a custom [StyleBox] for the panel of the [PopupDialog].
|
|
||||||
</theme_item>
|
|
||||||
</theme_items>
|
|
||||||
</class>
|
|
|
@ -330,13 +330,6 @@
|
||||||
Returns the tooltip associated with the specified index index [code]idx[/code].
|
Returns the tooltip associated with the specified index index [code]idx[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_hide_on_window_lose_focus" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the popup will be hidden when the window loses focus or not.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="is_item_checkable" qualifiers="const">
|
<method name="is_item_checkable" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -404,15 +397,6 @@
|
||||||
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
|
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_hide_on_window_lose_focus">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="enable" type="bool">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Hides the [PopupMenu] when the window loses focus.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_item_accelerator">
|
<method name="set_item_accelerator">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -604,7 +588,6 @@
|
||||||
<member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="false">
|
<member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="false">
|
||||||
If [code]true[/code], allows to navigate [PopupMenu] with letter keys.
|
If [code]true[/code], allows to navigate [PopupMenu] with letter keys.
|
||||||
</member>
|
</member>
|
||||||
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
|
|
||||||
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true">
|
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true">
|
||||||
If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected.
|
If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected.
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Class for displaying popups with a panel background.
|
Class for displaying popups with a panel background.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog].
|
Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [Window].
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|
|
@ -202,7 +202,7 @@
|
||||||
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
|
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
|
||||||
</member>
|
</member>
|
||||||
<member name="application/config/macos_native_icon" type="String" setter="" getter="" default="""">
|
<member name="application/config/macos_native_icon" type="String" setter="" getter="" default="""">
|
||||||
Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon].
|
Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
|
||||||
</member>
|
</member>
|
||||||
<member name="application/config/name" type="String" setter="" getter="" default="""">
|
<member name="application/config/name" type="String" setter="" getter="" default="""">
|
||||||
The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files.
|
The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files.
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
|
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
|
||||||
</member>
|
</member>
|
||||||
<member name="application/config/windows_native_icon" type="String" setter="" getter="" default="""">
|
<member name="application/config/windows_native_icon" type="String" setter="" getter="" default="""">
|
||||||
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon].
|
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
|
||||||
</member>
|
</member>
|
||||||
<member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false">
|
<member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false">
|
||||||
If [code]true[/code], disables printing to standard error in an exported build.
|
If [code]true[/code], disables printing to standard error in an exported build.
|
||||||
|
@ -426,12 +426,6 @@
|
||||||
<member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
|
<member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
|
||||||
If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
|
If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
|
||||||
</member>
|
</member>
|
||||||
<member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false">
|
|
||||||
If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it.
|
|
||||||
</member>
|
|
||||||
<member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter="" default="false">
|
|
||||||
Sets the window background to transparent when it starts.
|
|
||||||
</member>
|
|
||||||
<member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false">
|
<member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false">
|
||||||
Force the window to be always on top.
|
Force the window to be always on top.
|
||||||
</member>
|
</member>
|
||||||
|
@ -1002,7 +996,9 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""Vulkan"">
|
<member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""Vulkan"">
|
||||||
The video driver to use ("GLES2" or "Vulkan").
|
The video driver to use ("GLES2" or "Vulkan").
|
||||||
[b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time.
|
[b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument.
|
||||||
|
[b]FIXME:[/b] No longer valid after DisplayServer split:
|
||||||
|
In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/quality/filters/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
|
<member name="rendering/quality/filters/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
|
||||||
</member>
|
</member>
|
||||||
|
@ -1027,6 +1023,10 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1">
|
<member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1">
|
||||||
</member>
|
</member>
|
||||||
|
<member name="rendering/quality/glow/upscale_mode" type="int" setter="" getter="" default="1">
|
||||||
|
</member>
|
||||||
|
<member name="rendering/quality/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0">
|
||||||
|
</member>
|
||||||
<member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2">
|
<member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2">
|
||||||
Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment].
|
Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment].
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -763,8 +763,6 @@
|
||||||
</argument>
|
</argument>
|
||||||
<argument index="10" name="hdr_luminance_cap" type="float">
|
<argument index="10" name="hdr_luminance_cap" type="float">
|
||||||
</argument>
|
</argument>
|
||||||
<argument index="11" name="bicubic_upscale" type="bool">
|
|
||||||
</argument>
|
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -2812,7 +2810,7 @@
|
||||||
<argument index="2" name="screen" type="int" default="0">
|
<argument index="2" name="screen" type="int" default="0">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
|
Copies the viewport to a region of the screen specified by [code]rect[/code]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
|
||||||
For example, you can set the root viewport to not render at all with the following code:
|
For example, you can set the root viewport to not render at all with the following code:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
func _ready():
|
func _ready():
|
||||||
|
@ -2830,15 +2828,6 @@
|
||||||
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
|
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="viewport_detach">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="viewport" type="RID">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Detaches the viewport from the screen.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="viewport_get_render_info">
|
<method name="viewport_get_render_info">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
|
@ -3378,7 +3367,9 @@
|
||||||
<constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode">
|
<constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode">
|
||||||
Update the viewport whenever it is visible.
|
Update the viewport whenever it is visible.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode">
|
<constant name="VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="ViewportUpdateMode">
|
||||||
|
</constant>
|
||||||
|
<constant name="VIEWPORT_UPDATE_ALWAYS" value="4" enum="ViewportUpdateMode">
|
||||||
Always update the viewport.
|
Always update the viewport.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode">
|
<constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode">
|
||||||
|
|
|
@ -135,13 +135,6 @@
|
||||||
Returns [code]true[/code] if there is a [member network_peer] set.
|
Returns [code]true[/code] if there is a [member network_peer] set.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_input_handled">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the most recent [InputEvent] was marked as handled with [method set_input_as_handled].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="is_network_server" qualifiers="const">
|
<method name="is_network_server" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -237,13 +230,6 @@
|
||||||
Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags].
|
Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_input_as_handled">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Marks the most recent [InputEvent] as handled.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_quit_on_go_back">
|
<method name="set_quit_on_go_back">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -251,22 +237,7 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default.
|
If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default.
|
||||||
To handle 'Go Back' button when this option is disabled, use [constant MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST].
|
To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST].
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_screen_stretch">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="mode" type="int" enum="SceneTree.StretchMode">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="aspect" type="int" enum="SceneTree.StretchAspect">
|
|
||||||
</argument>
|
|
||||||
<argument index="2" name="minsize" type="Vector2">
|
|
||||||
</argument>
|
|
||||||
<argument index="3" name="shrink" type="float" default="1">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Configures screen stretching to the given [enum StretchMode], [enum StretchAspect], minimum size and [code]shrink[/code] ratio.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -301,11 +272,8 @@
|
||||||
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
|
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
|
||||||
If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections.
|
If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections.
|
||||||
</member>
|
</member>
|
||||||
<member name="root" type="Viewport" setter="" getter="get_root">
|
<member name="root" type="Window" setter="" getter="get_root">
|
||||||
The [SceneTree]'s root [Viewport].
|
The [SceneTree]'s root [Window].
|
||||||
</member>
|
|
||||||
<member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling" default="false">
|
|
||||||
If [code]true[/code], font oversampling is used.
|
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
|
@ -328,15 +296,6 @@
|
||||||
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
|
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="global_menu_action">
|
|
||||||
<argument index="0" name="id" type="Variant">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="meta" type="Variant">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Emitted whenever global menu item is clicked.
|
|
||||||
</description>
|
|
||||||
</signal>
|
|
||||||
<signal name="idle_frame">
|
<signal name="idle_frame">
|
||||||
<description>
|
<description>
|
||||||
Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
|
Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
|
||||||
|
@ -389,11 +348,6 @@
|
||||||
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
|
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="screen_resized">
|
|
||||||
<description>
|
|
||||||
Emitted when the screen resolution (fullscreen) or window size (windowed) changes.
|
|
||||||
</description>
|
|
||||||
</signal>
|
|
||||||
<signal name="server_disconnected">
|
<signal name="server_disconnected">
|
||||||
<description>
|
<description>
|
||||||
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
|
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
|
||||||
|
@ -418,29 +372,5 @@
|
||||||
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
|
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
|
||||||
Call a group only once even if the call is executed many times.
|
Call a group only once even if the call is executed many times.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STRETCH_MODE_DISABLED" value="0" enum="StretchMode">
|
|
||||||
No stretching.
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_MODE_2D" value="1" enum="StretchMode">
|
|
||||||
Render stretching in higher resolution (interpolated).
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_MODE_VIEWPORT" value="2" enum="StretchMode">
|
|
||||||
Keep the specified display resolution. No interpolation. Content may appear pixelated.
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_ASPECT_IGNORE" value="0" enum="StretchAspect">
|
|
||||||
Fill the window with the content stretched to cover excessive space. Content may appear stretched.
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_ASPECT_KEEP" value="1" enum="StretchAspect">
|
|
||||||
Retain the same aspect ratio by padding with black bars on either axis. This prevents distortion.
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2" enum="StretchAspect">
|
|
||||||
Expand vertically. Left/right black bars may appear if the window is too wide.
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_ASPECT_KEEP_HEIGHT" value="3" enum="StretchAspect">
|
|
||||||
Expand horizontally. Top/bottom black bars may appear if the window is too tall.
|
|
||||||
</constant>
|
|
||||||
<constant name="STRETCH_ASPECT_EXPAND" value="4" enum="StretchAspect">
|
|
||||||
Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars.
|
|
||||||
</constant>
|
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
The Editor's popup dialog for creating new [Script] files.
|
The Editor's popup dialog for creating new [Script] files.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Popup.popup] methods.
|
The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Window.popup] methods.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
func _ready():
|
func _ready():
|
||||||
dialog.config("Node", "res://new_node.gd") # For in-engine types
|
dialog.config("Node", "res://new_node.gd") # For in-engine types
|
||||||
|
@ -33,10 +33,7 @@
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
|
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
|
||||||
<member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" override="true" default="232.0" />
|
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Attach Node Script"" />
|
||||||
<member name="margin_right" type="float" setter="set_margin" getter="get_margin" override="true" default="361.0" />
|
|
||||||
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" override="true" default="Vector2( 361, 232 )" />
|
|
||||||
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default=""Attach Node Script"" />
|
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="script_created">
|
<signal name="script_created">
|
||||||
|
|
|
@ -44,13 +44,6 @@
|
||||||
Returns the total transform of the viewport.
|
Returns the total transform of the viewport.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_modal_stack_top" qualifiers="const">
|
|
||||||
<return type="Control">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the topmost modal in the stack.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_mouse_position" qualifiers="const">
|
<method name="get_mouse_position" qualifiers="const">
|
||||||
<return type="Vector2">
|
<return type="Vector2">
|
||||||
</return>
|
</return>
|
||||||
|
@ -76,13 +69,6 @@
|
||||||
Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
|
Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_size_override" qualifiers="const">
|
|
||||||
<return type="Vector2">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the size override set with [method set_size_override].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_texture" qualifiers="const">
|
<method name="get_texture" qualifiers="const">
|
||||||
<return type="ViewportTexture">
|
<return type="ViewportTexture">
|
||||||
</return>
|
</return>
|
||||||
|
@ -116,13 +102,6 @@
|
||||||
Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
|
Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="gui_has_modal_stack" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if there are visible modals on-screen.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="gui_is_dragging" qualifiers="const">
|
<method name="gui_is_dragging" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
|
@ -133,8 +112,24 @@
|
||||||
<method name="input">
|
<method name="input">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="local_event" type="InputEvent">
|
<argument index="0" name="event" type="InputEvent">
|
||||||
</argument>
|
</argument>
|
||||||
|
<argument index="1" name="in_local_coords" type="bool" default="false">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="input_text">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="text" type="String">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="is_embedding_subwindows" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -144,22 +139,6 @@
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_size_override_enabled" qualifiers="const">
|
|
||||||
<return type="bool">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns [code]true[/code] if the size override is enabled. See [method set_size_override].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_attach_to_screen_rect">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="rect" type="Rect2">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [Viewport] manually.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="set_input_as_handled">
|
<method name="set_input_as_handled">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
|
@ -178,23 +157,12 @@
|
||||||
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
|
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_size_override">
|
|
||||||
<return type="void">
|
|
||||||
</return>
|
|
||||||
<argument index="0" name="enable" type="bool">
|
|
||||||
</argument>
|
|
||||||
<argument index="1" name="size" type="Vector2" default="Vector2( -1, -1 )">
|
|
||||||
</argument>
|
|
||||||
<argument index="2" name="margin" type="Vector2" default="Vector2( 0, 0 )">
|
|
||||||
</argument>
|
|
||||||
<description>
|
|
||||||
Sets the size override of the viewport. If the [code]enable[/code] parameter is [code]true[/code] the override is used, otherwise it uses the default size. If the size parameter is [code](-1, -1)[/code], it won't update the size.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="unhandled_input">
|
<method name="unhandled_input">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="local_event" type="InputEvent">
|
<argument index="0" name="event" type="InputEvent">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="in_local_coords" type="bool" default="false">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
|
@ -217,9 +185,6 @@
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr" default="false">
|
|
||||||
If [code]true[/code], the viewport will be used in AR/VR process.
|
|
||||||
</member>
|
|
||||||
<member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false">
|
<member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false">
|
||||||
If [code]true[/code], the viewport will process 2D audio streams.
|
If [code]true[/code], the viewport will process 2D audio streams.
|
||||||
</member>
|
</member>
|
||||||
|
@ -242,6 +207,8 @@
|
||||||
<member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false">
|
<member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false">
|
||||||
If [code]true[/code], the viewport will not receive input event.
|
If [code]true[/code], the viewport will not receive input event.
|
||||||
</member>
|
</member>
|
||||||
|
<member name="gui_embed_subwindows" type="bool" setter="set_embed_subwindows_hint" getter="get_embed_subwindows_hint" default="false">
|
||||||
|
</member>
|
||||||
<member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled" default="true">
|
<member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled" default="true">
|
||||||
If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly.
|
If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly.
|
||||||
</member>
|
</member>
|
||||||
|
@ -256,15 +223,6 @@
|
||||||
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
|
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
|
||||||
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
|
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
|
||||||
</member>
|
</member>
|
||||||
<member name="render_direct_to_screen" type="bool" setter="set_use_render_direct_to_screen" getter="is_using_render_direct_to_screen" default="false">
|
|
||||||
If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method RenderingServer.viewport_set_render_direct_to_screen].
|
|
||||||
</member>
|
|
||||||
<member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode" default="0">
|
|
||||||
The clear mode when viewport used as a render target.
|
|
||||||
</member>
|
|
||||||
<member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode" default="2">
|
|
||||||
The update mode when viewport used as a render target.
|
|
||||||
</member>
|
|
||||||
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
|
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
|
||||||
The subdivision amount of the first quadrant on the shadow atlas.
|
The subdivision amount of the first quadrant on the shadow atlas.
|
||||||
</member>
|
</member>
|
||||||
|
@ -281,12 +239,6 @@
|
||||||
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
|
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
|
||||||
[b]Note:[/b] If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
|
[b]Note:[/b] If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
|
||||||
</member>
|
</member>
|
||||||
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )">
|
|
||||||
The width and height of viewport.
|
|
||||||
</member>
|
|
||||||
<member name="size_override_stretch" type="bool" setter="set_size_override_stretch" getter="is_size_override_stretch_enabled" default="false">
|
|
||||||
If [code]true[/code], the size override affects stretch as well.
|
|
||||||
</member>
|
|
||||||
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
|
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
|
||||||
If [code]true[/code], the viewport should render its background as transparent.
|
If [code]true[/code], the viewport should render its background as transparent.
|
||||||
</member>
|
</member>
|
||||||
|
@ -307,23 +259,11 @@
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="size_changed">
|
<signal name="size_changed">
|
||||||
<description>
|
<description>
|
||||||
Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
|
Emitted when the size of the viewport is changed, whether by resizing of window, or some other means.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="UPDATE_DISABLED" value="0" enum="UpdateMode">
|
|
||||||
Do not update the render target.
|
|
||||||
</constant>
|
|
||||||
<constant name="UPDATE_ONCE" value="1" enum="UpdateMode">
|
|
||||||
Update the render target once, then switch to [constant UPDATE_DISABLED].
|
|
||||||
</constant>
|
|
||||||
<constant name="UPDATE_WHEN_VISIBLE" value="2" enum="UpdateMode">
|
|
||||||
Update the render target only when it is visible. This is the default value.
|
|
||||||
</constant>
|
|
||||||
<constant name="UPDATE_ALWAYS" value="3" enum="UpdateMode">
|
|
||||||
Always update the render target.
|
|
||||||
</constant>
|
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will not be used.
|
This quadrant will not be used.
|
||||||
</constant>
|
</constant>
|
||||||
|
@ -410,15 +350,6 @@
|
||||||
<constant name="MSAA_16X" value="4" enum="MSAA">
|
<constant name="MSAA_16X" value="4" enum="MSAA">
|
||||||
Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
|
Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
|
|
||||||
Always clear the render target before drawing.
|
|
||||||
</constant>
|
|
||||||
<constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode">
|
|
||||||
Never clear the render target.
|
|
||||||
</constant>
|
|
||||||
<constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode">
|
|
||||||
Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER].
|
|
||||||
</constant>
|
|
||||||
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
|
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="1" enum="DefaultCanvasItemTextureFilter">
|
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="1" enum="DefaultCanvasItemTextureFilter">
|
||||||
|
|
419
doc/classes/Window.xml
Normal file
419
doc/classes/Window.xml
Normal file
|
@ -0,0 +1,419 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<class name="Window" inherits="Viewport" version="4.0">
|
||||||
|
<brief_description>
|
||||||
|
</brief_description>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
<tutorials>
|
||||||
|
</tutorials>
|
||||||
|
<methods>
|
||||||
|
<method name="can_draw" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="child_controls_changed">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_flag" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="flag" type="int" enum="Window.Flags">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_real_size" qualifiers="const">
|
||||||
|
<return type="Vector2i">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_color" qualifiers="const">
|
||||||
|
<return type="Color">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_constant" qualifiers="const">
|
||||||
|
<return type="int">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_font" qualifiers="const">
|
||||||
|
<return type="Font">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_icon" qualifiers="const">
|
||||||
|
<return type="Texture2D">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_theme_stylebox" qualifiers="const">
|
||||||
|
<return type="StyleBox">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="grab_focus">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_focus" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_color" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_constant" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_font" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_icon" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="has_theme_stylebox" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="name" type="StringName">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="type" type="StringName" default="""">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="hide">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="is_embedded" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="is_maximize_allowed" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="is_using_font_oversampling" qualifiers="const">
|
||||||
|
<return type="bool">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="move_to_foreground">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="popup">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="popup_centered">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="popup_centered_clamped">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="fallback_ratio" type="float" default="0.75">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="popup_centered_ratio">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="ratio" type="float" default="0.8">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="popup_on_parent">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="parent_rect" type="Rect2i">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="request_attention">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="set_flag">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="flag" type="int" enum="Window.Flags">
|
||||||
|
</argument>
|
||||||
|
<argument index="1" name="enabled" type="bool">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="set_ime_active">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="arg0" type="bool">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="set_ime_position">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="arg0" type="Vector2i">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="set_use_font_oversampling">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<argument index="0" name="enable" type="bool">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="show">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
</methods>
|
||||||
|
<members>
|
||||||
|
<member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
|
||||||
|
</member>
|
||||||
|
<member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
|
||||||
|
</member>
|
||||||
|
<member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i( 0, 0 )">
|
||||||
|
</member>
|
||||||
|
<member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
|
||||||
|
</member>
|
||||||
|
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i( 0, 0 )">
|
||||||
|
</member>
|
||||||
|
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i( 0, 0 )">
|
||||||
|
</member>
|
||||||
|
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
|
||||||
|
</member>
|
||||||
|
<member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i( 0, 0 )">
|
||||||
|
</member>
|
||||||
|
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 100, 100 )">
|
||||||
|
</member>
|
||||||
|
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
|
||||||
|
</member>
|
||||||
|
<member name="title" type="String" setter="set_title" getter="get_title" default="""">
|
||||||
|
</member>
|
||||||
|
<member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="transparent" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||||
|
</member>
|
||||||
|
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
|
||||||
|
</member>
|
||||||
|
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
<signals>
|
||||||
|
<signal name="about_to_popup">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="close_requested">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="files_dropped">
|
||||||
|
<argument index="0" name="files" type="PackedStringArray">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="focus_entered">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="focus_exited">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="go_back_requested">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="mouse_entered">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="mouse_exited">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="visibility_changed">
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
<signal name="window_input">
|
||||||
|
<argument index="0" name="event" type="InputEvent">
|
||||||
|
</argument>
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</signal>
|
||||||
|
</signals>
|
||||||
|
<constants>
|
||||||
|
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
|
||||||
|
</constant>
|
||||||
|
<constant name="MODE_WINDOWED" value="0" enum="Mode">
|
||||||
|
</constant>
|
||||||
|
<constant name="MODE_MINIMIZED" value="1" enum="Mode">
|
||||||
|
</constant>
|
||||||
|
<constant name="MODE_MAXIMIZED" value="2" enum="Mode">
|
||||||
|
</constant>
|
||||||
|
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
|
||||||
|
</constant>
|
||||||
|
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
|
||||||
|
</constant>
|
||||||
|
<constant name="FLAG_BORDERLESS" value="1" enum="Flags">
|
||||||
|
</constant>
|
||||||
|
<constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags">
|
||||||
|
</constant>
|
||||||
|
<constant name="FLAG_TRANSPARENT" value="3" enum="Flags">
|
||||||
|
</constant>
|
||||||
|
<constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
|
||||||
|
</constant>
|
||||||
|
<constant name="FLAG_MAX" value="5" enum="Flags">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_MODE_OBJECTS" value="1" enum="ContentScaleMode">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_MODE_PIXELS" value="2" enum="ContentScaleMode">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_ASPECT_KEEP" value="1" enum="ContentScaleAspect">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_ASPECT_KEEP_WIDTH" value="2" enum="ContentScaleAspect">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value="3" enum="ContentScaleAspect">
|
||||||
|
</constant>
|
||||||
|
<constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
|
||||||
|
</constant>
|
||||||
|
</constants>
|
||||||
|
<theme_items>
|
||||||
|
<theme_item name="close" type="Texture2D">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="close_h_ofs" type="int" default="18">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="close_highlight" type="Texture2D">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="close_v_ofs" type="int" default="18">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="panel" type="StyleBox">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="resize_margin" type="int" default="4">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="scaleborder_size" type="int" default="4">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="title_font" type="Font">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="title_height" type="int" default="20">
|
||||||
|
</theme_item>
|
||||||
|
<theme_item name="window_panel" type="StyleBox">
|
||||||
|
</theme_item>
|
||||||
|
</theme_items>
|
||||||
|
</class>
|
|
@ -1,59 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<class name="WindowDialog" inherits="Popup" version="4.0">
|
|
||||||
<brief_description>
|
|
||||||
Base class for window dialogs.
|
|
||||||
</brief_description>
|
|
||||||
<description>
|
|
||||||
Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
|
|
||||||
</description>
|
|
||||||
<tutorials>
|
|
||||||
</tutorials>
|
|
||||||
<methods>
|
|
||||||
<method name="get_close_button">
|
|
||||||
<return type="TextureButton">
|
|
||||||
</return>
|
|
||||||
<description>
|
|
||||||
Returns the close [TextureButton].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
</methods>
|
|
||||||
<members>
|
|
||||||
<member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" default="false">
|
|
||||||
If [code]true[/code], the user can resize the window.
|
|
||||||
</member>
|
|
||||||
<member name="window_title" type="String" setter="set_title" getter="get_title" default="""">
|
|
||||||
The text displayed in the window's title bar.
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
<constants>
|
|
||||||
</constants>
|
|
||||||
<theme_items>
|
|
||||||
<theme_item name="close" type="Texture2D">
|
|
||||||
The icon for the close button.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="close_h_ofs" type="int" default="18">
|
|
||||||
The horizontal offset of the close button.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="close_highlight" type="Texture2D">
|
|
||||||
The icon used for the close button when it's hovered with the mouse cursor.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="close_v_ofs" type="int" default="18">
|
|
||||||
The vertical offset of the close button.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="panel" type="StyleBox">
|
|
||||||
The style for both the content background of the [WindowDialog] and the title bar.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="scaleborder_size" type="int" default="4">
|
|
||||||
The thickness of the border that can be dragged when scaling the window (if [member resizable] is enabled).
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
|
|
||||||
The color of the title text.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="title_font" type="Font">
|
|
||||||
The font used to draw the title.
|
|
||||||
</theme_item>
|
|
||||||
<theme_item name="title_height" type="int" default="20">
|
|
||||||
The vertical offset of the title text.
|
|
||||||
</theme_item>
|
|
||||||
</theme_items>
|
|
||||||
</class>
|
|
|
@ -77,7 +77,7 @@ public:
|
||||||
void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) {}
|
void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, bool p_bicubic_upscale) {}
|
void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap) {}
|
||||||
|
|
||||||
void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture) {}
|
void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture) {}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Command line arguments
|
# Command line arguments
|
||||||
|
run_black=false
|
||||||
run_clang_format=false
|
run_clang_format=false
|
||||||
run_fix_headers=false
|
run_fix_headers=false
|
||||||
usage="Invalid argument. Usage:\n$0 <option>\n\t--clang-format|-c\n\t--headers|-h\n\t--all|-a"
|
usage="Invalid argument. Usage:\n$0 <option>\n\t--black|-b\n\t--clang-format|-c\n\t--headers|-h\n\t--all|-a"
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo -e $usage
|
echo -e $usage
|
||||||
|
@ -12,6 +13,9 @@ fi
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--black|-b)
|
||||||
|
run_black=true
|
||||||
|
;;
|
||||||
--clang-format|-c)
|
--clang-format|-c)
|
||||||
run_clang_format=true
|
run_clang_format=true
|
||||||
;;
|
;;
|
||||||
|
@ -19,6 +23,7 @@ while [ $# -gt 0 ]; do
|
||||||
run_fix_headers=true
|
run_fix_headers=true
|
||||||
;;
|
;;
|
||||||
--all|-a)
|
--all|-a)
|
||||||
|
run_black=true
|
||||||
run_clang_format=true
|
run_clang_format=true
|
||||||
run_fix_headers=true
|
run_fix_headers=true
|
||||||
;;
|
;;
|
||||||
|
@ -32,6 +37,19 @@ done
|
||||||
echo "Removing generated files, some have binary data and make clang-format freeze."
|
echo "Removing generated files, some have binary data and make clang-format freeze."
|
||||||
find -name "*.gen.*" -delete
|
find -name "*.gen.*" -delete
|
||||||
|
|
||||||
|
# Apply black
|
||||||
|
if $run_black; then
|
||||||
|
echo -e "Formatting Python files..."
|
||||||
|
PY_FILES=$(find \( -path "./.git" \
|
||||||
|
-o -path "./thirdparty" \
|
||||||
|
\) -prune \
|
||||||
|
-o \( -name "SConstruct" \
|
||||||
|
-o -name "SCsub" \
|
||||||
|
-o -name "*.py" \
|
||||||
|
\) -print)
|
||||||
|
black -l 120 $PY_FILES
|
||||||
|
fi
|
||||||
|
|
||||||
# Apply clang-format
|
# Apply clang-format
|
||||||
if $run_clang_format; then
|
if $run_clang_format; then
|
||||||
# Sync list with pre-commit hook
|
# Sync list with pre-commit hook
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "panel.h"
|
#include "panel.h"
|
||||||
|
|
||||||
#include "core/print_string.h"
|
#include "core/print_string.h"
|
||||||
|
|
||||||
void Panel::_notification(int p_what) {
|
void Panel::_notification(int p_what) {
|
||||||
|
@ -54,7 +55,11 @@ void Panel::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_mode"), &Panel::get_mode);
|
ClassDB::bind_method(D_METHOD("get_mode"), &Panel::get_mode);
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Background,Foreground"), "set_mode", "get_mode");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Background,Foreground"), "set_mode", "get_mode");
|
||||||
|
|
||||||
|
BIND_ENUM_CONSTANT(MODE_BACKGROUND);
|
||||||
|
BIND_ENUM_CONSTANT(MODE_FOREGROUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel::Panel() {
|
Panel::Panel() {
|
||||||
// Has visible stylebox, so stop by default.
|
// Has visible stylebox, so stop by default.
|
||||||
set_mouse_filter(MOUSE_FILTER_STOP);
|
set_mouse_filter(MOUSE_FILTER_STOP);
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Panel : public Control {
|
||||||
public:
|
public:
|
||||||
enum Mode {
|
enum Mode {
|
||||||
MODE_BACKGROUND,
|
MODE_BACKGROUND,
|
||||||
MODE_FOREGROUND
|
MODE_FOREGROUND,
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -59,4 +59,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(Panel::Mode)
|
VARIANT_ENUM_CAST(Panel::Mode)
|
||||||
#endif
|
|
||||||
|
#endif // PANEL_H
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
MODE_WINDOWED = DisplayServer::WINDOW_MODE_WINDOWED,
|
MODE_WINDOWED = DisplayServer::WINDOW_MODE_WINDOWED,
|
||||||
MODE_MINIMIZED = DisplayServer::WINDOW_MODE_MINIMIZED,
|
MODE_MINIMIZED = DisplayServer::WINDOW_MODE_MINIMIZED,
|
||||||
MODE_MAXIMIZED = DisplayServer::WINDOW_MODE_MAXIMIZED,
|
MODE_MAXIMIZED = DisplayServer::WINDOW_MODE_MAXIMIZED,
|
||||||
MODE_FULLSCREEN = DisplayServer::WINDOW_MODE_FULLSCREEN
|
MODE_FULLSCREEN = DisplayServer::WINDOW_MODE_FULLSCREEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Flags {
|
enum Flags {
|
||||||
|
@ -59,7 +59,6 @@ public:
|
||||||
CONTENT_SCALE_MODE_DISABLED,
|
CONTENT_SCALE_MODE_DISABLED,
|
||||||
CONTENT_SCALE_MODE_OBJECTS,
|
CONTENT_SCALE_MODE_OBJECTS,
|
||||||
CONTENT_SCALE_MODE_PIXELS,
|
CONTENT_SCALE_MODE_PIXELS,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ContentScaleAspect {
|
enum ContentScaleAspect {
|
||||||
|
@ -68,10 +67,10 @@ public:
|
||||||
CONTENT_SCALE_ASPECT_KEEP_WIDTH,
|
CONTENT_SCALE_ASPECT_KEEP_WIDTH,
|
||||||
CONTENT_SCALE_ASPECT_KEEP_HEIGHT,
|
CONTENT_SCALE_ASPECT_KEEP_HEIGHT,
|
||||||
CONTENT_SCALE_ASPECT_EXPAND,
|
CONTENT_SCALE_ASPECT_EXPAND,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DEFAULT_WINDOW_SIZE = 100
|
DEFAULT_WINDOW_SIZE = 100,
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -258,8 +257,8 @@ public:
|
||||||
~Window();
|
~Window();
|
||||||
};
|
};
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(Window::Window::Mode);
|
VARIANT_ENUM_CAST(Window::Mode);
|
||||||
VARIANT_ENUM_CAST(Window::Window::Flags);
|
VARIANT_ENUM_CAST(Window::Flags);
|
||||||
VARIANT_ENUM_CAST(Window::ContentScaleMode);
|
VARIANT_ENUM_CAST(Window::ContentScaleMode);
|
||||||
VARIANT_ENUM_CAST(Window::ContentScaleAspect);
|
VARIANT_ENUM_CAST(Window::ContentScaleAspect);
|
||||||
|
|
||||||
|
|
|
@ -1802,7 +1802,7 @@ void RenderingServer::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_bg_energy", "env", "energy"), &RenderingServer::environment_set_bg_energy);
|
ClassDB::bind_method(D_METHOD("environment_set_bg_energy", "env", "energy"), &RenderingServer::environment_set_bg_energy);
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_canvas_max_layer", "env", "max_layer"), &RenderingServer::environment_set_canvas_max_layer);
|
ClassDB::bind_method(D_METHOD("environment_set_canvas_max_layer", "env", "max_layer"), &RenderingServer::environment_set_canvas_max_layer);
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_ambient_light", "env", "color", "ambient", "energy", "sky_contibution", "reflection_source", "ao_color"), &RenderingServer::environment_set_ambient_light, DEFVAL(RS::ENV_AMBIENT_SOURCE_BG), DEFVAL(1.0), DEFVAL(0.0), DEFVAL(RS::ENV_REFLECTION_SOURCE_BG), DEFVAL(Color()));
|
ClassDB::bind_method(D_METHOD("environment_set_ambient_light", "env", "color", "ambient", "energy", "sky_contibution", "reflection_source", "ao_color"), &RenderingServer::environment_set_ambient_light, DEFVAL(RS::ENV_AMBIENT_SOURCE_BG), DEFVAL(1.0), DEFVAL(0.0), DEFVAL(RS::ENV_REFLECTION_SOURCE_BG), DEFVAL(Color()));
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_glow", "env", "enable", "level_flags", "intensity", "strength", "mix", "bloom_threshold", "blend_mode", "hdr_bleed_threshold", "hdr_bleed_scale", "hdr_luminance_cap", "bicubic_upscale"), &RenderingServer::environment_set_glow);
|
ClassDB::bind_method(D_METHOD("environment_set_glow", "env", "enable", "level_flags", "intensity", "strength", "mix", "bloom_threshold", "blend_mode", "hdr_bleed_threshold", "hdr_bleed_scale", "hdr_luminance_cap"), &RenderingServer::environment_set_glow);
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_tonemap", "env", "tone_mapper", "exposure", "white", "auto_exposure", "min_luminance", "max_luminance", "auto_exp_speed", "auto_exp_grey"), &RenderingServer::environment_set_tonemap);
|
ClassDB::bind_method(D_METHOD("environment_set_tonemap", "env", "tone_mapper", "exposure", "white", "auto_exposure", "min_luminance", "max_luminance", "auto_exp_speed", "auto_exp_grey"), &RenderingServer::environment_set_tonemap);
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "ramp"), &RenderingServer::environment_set_adjustment);
|
ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "ramp"), &RenderingServer::environment_set_adjustment);
|
||||||
ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance", "roughness"), &RenderingServer::environment_set_ssr);
|
ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance", "roughness"), &RenderingServer::environment_set_ssr);
|
||||||
|
|
Loading…
Reference in a new issue