diff options
Diffstat (limited to 'doc/classes')
51 files changed, 409 insertions, 116 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 9eeb69d824..b89eb121b6 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2789,13 +2789,13 @@ The property is serialized and saved in the scene file (default). </constant> <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags"> - The property is shown in the editor Inspector (default). + The property is shown in the [EditorInspector] (default). </constant> <constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags"> - The property can be checked in the editor inspector. + The property can be checked in the [EditorInspector]. </constant> <constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags"> - The property is checked in the editor inspector. + The property is checked in the [EditorInspector]. </constant> <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags"> The property is a translatable string. @@ -2853,7 +2853,7 @@ <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags"> </constant> <constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags"> - The property is read-only in the editor Inspector. + The property is read-only in the [EditorInspector]. </constant> <constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags"> The property is an array. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index df0fb11ac7..008296713d 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -26,6 +26,7 @@ [/csharp] [/codeblocks] Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types. + [b]Note:[/b] For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons. </description> <tutorials> <link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link> @@ -209,6 +210,7 @@ <param index="1" name="time" type="float" /> <param index="2" name="amount" type="float" /> <description> + Inserts a key in a given blend shape track. Returns the key index. </description> </method> <method name="clear"> @@ -223,6 +225,8 @@ <param index="1" name="fps" type="int" default="120" /> <param index="2" name="split_tolerance" type="float" default="4.0" /> <description> + Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return [code]true[/code] once called on this [Animation]. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. + [b]Note:[/b] Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them. </description> </method> <method name="copy_track"> @@ -278,6 +282,7 @@ <param index="1" name="time" type="float" /> <param index="2" name="position" type="Vector3" /> <description> + Inserts a key in a given 3D position track. Returns the key index. </description> </method> <method name="remove_track"> @@ -293,6 +298,7 @@ <param index="1" name="time" type="float" /> <param index="2" name="rotation" type="Quaternion" /> <description> + Inserts a key in a given 3D rotation track. Returns the key index. </description> </method> <method name="scale_track_insert_key"> @@ -301,6 +307,7 @@ <param index="1" name="time" type="float" /> <param index="2" name="scale" type="Vector3" /> <description> + Inserts a key in a given 3D scale track. Returns the key index. </description> </method> <method name="track_find_key" qualifiers="const"> @@ -385,6 +392,7 @@ <return type="bool" /> <param index="0" name="track_idx" type="int" /> <description> + Returns [code]true[/code] if the track is compressed, [code]false[/code] otherwise. See also [method compress]. </description> </method> <method name="track_is_enabled" qualifiers="const"> @@ -569,15 +577,19 @@ </signals> <constants> <constant name="TYPE_VALUE" value="0" enum="TrackType"> - Value tracks set values in node properties, but only those which can be Interpolated. + Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons. </constant> <constant name="TYPE_POSITION_3D" value="1" enum="TrackType"> + 3D position track (values are stored in [Vector3]s). </constant> <constant name="TYPE_ROTATION_3D" value="2" enum="TrackType"> + 3D rotation track (values are stored in [Quaternion]s). </constant> <constant name="TYPE_SCALE_3D" value="3" enum="TrackType"> + 3D scale track (values are stored in [Vector3]s). </constant> <constant name="TYPE_BLEND_SHAPE" value="4" enum="TrackType"> + Blend shape track. </constant> <constant name="TYPE_METHOD" value="5" enum="TrackType"> Method tracks call functions with given arguments per key. @@ -598,7 +610,7 @@ Linear interpolation. </constant> <constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType"> - Cubic interpolation. + Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return. </constant> <constant name="INTERPOLATION_LINEAR_ANGLE" value="3" enum="InterpolationType"> Linear interpolation with shortest path rotation. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index bf5ac7fa9e..9efd3ac939 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -217,7 +217,7 @@ </member> <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default=""""> The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. - [b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. + [b]Note:[/b] While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. </member> <member name="current_animation_length" type="float" setter="" getter="get_current_animation_length"> The length (in seconds) of the currently playing animation. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index dbc7d0fb29..de980eab0c 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -115,7 +115,7 @@ The color used by the backlight effect. Represents the light passing through an object. </member> <member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], the backlight effect is enabled. + If [code]true[/code], the backlight effect is enabled. See also [member subsurf_scatter_transmittance_enabled]. </member> <member name="backlight_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to control the backlight effect per-pixel. Added to [member backlight]. @@ -289,6 +289,7 @@ [b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To display a normal map [i]above[/i] the [member detail_albedo] texture, use [member detail_normal] instead. </member> <member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of [member ao_texture], [member roughness_texture] and [member metallic_texture] in [ORMMaterial3D]. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored. </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. @@ -350,13 +351,13 @@ </member> <member name="specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="BaseMaterial3D.SpecularMode" default="0"> The method for rendering the specular blob. See [enum SpecularMode]. - [b]Note:[/b] Only applies to the specular blob. Does not affect specular reflections from the Sky, SSR, or ReflectionProbes. + [b]Note:[/b] [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to [code]0.0[/code] instead. </member> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. </member> <member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin. + If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering. </member> <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0"> The strength of the subsurface scattering effect. @@ -365,14 +366,19 @@ Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]. </member> <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0"> + The intensity of the subsurface scattering transmittance effect. </member> <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color(1, 1, 1, 1)"> + The color to multiply the subsurface scattering transmittance effect with. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code]. </member> <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth" default="0.1"> + The depth of the subsurface scattering transmittance effect. </member> <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], enables subsurface scattering transmittance. Only effective if [member subsurf_scatter_enabled] is [code]true[/code]. See also [member backlight_enabled]. </member> <member name="subsurf_scatter_transmittance_texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also [member subsurf_scatter_texture]. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code]. </member> <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3"> Filter flags for the texture. See [enum TextureFilter] for options. @@ -385,6 +391,7 @@ If [code]true[/code], transparency is enabled on the body. See also [member blend_mode]. </member> <member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering. </member> <member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], render point size can be changed. @@ -682,6 +689,7 @@ Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. </constant> <constant name="FLAG_PARTICLE_TRAILS_MODE" value="19" enum="Flags"> + Enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering. </constant> <constant name="FLAG_ALBEDO_TEXTURE_MSDF" value="20" enum="Flags"> Enables multichannel signed distance field rendering shader. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 0f1f4b57a9..652d6d2407 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -70,7 +70,7 @@ <param index="0" name="euler" type="Vector3" /> <param index="1" name="order" type="int" default="2" /> <description> - Creates a [Basis] from the given [Vector3] representing Euler angles. [param order] determines in what order rotation components are applied. Defaults to [constant EULER_ORDER_YXZ]. + Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). </description> </method> <method name="from_scale" qualifiers="static"> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index e78cdfc951..1ff51b48be 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -11,7 +11,7 @@ func _ready(): var button = Button.new() button.text = "Click me" - button.connect("pressed", self, "_button_pressed") + button.pressed.connect(self._button_pressed) add_child(button) func _button_pressed(): @@ -22,7 +22,7 @@ { var button = new Button(); button.Text = "Click me"; - button.Connect("pressed", this, nameof(ButtonPressed)); + button.Pressed += ButtonPressed; AddChild(button); } diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 947e6a3d4c..b2d3e5cfdb 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -535,7 +535,7 @@ </method> </methods> <members> - <member name="clip_children" type="bool" setter="set_clip_children" getter="is_clipping_children" default="false"> + <member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0"> Allows the current node to clip children nodes, essentially acting as a mask. </member> <member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1"> @@ -653,5 +653,13 @@ <constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat"> Represents the size of the [enum TextureRepeat] enum. </constant> + <constant name="CLIP_CHILDREN_DISABLED" value="0" enum="ClipChildrenMode"> + </constant> + <constant name="CLIP_CHILDREN_ONLY" value="1" enum="ClipChildrenMode"> + </constant> + <constant name="CLIP_CHILDREN_AND_DRAW" value="2" enum="ClipChildrenMode"> + </constant> + <constant name="CLIP_CHILDREN_MAX" value="3" enum="ClipChildrenMode"> + </constant> </constants> </class> diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml index ac18c2d474..2dc83790c7 100644 --- a/doc/classes/CanvasTexture.xml +++ b/doc/classes/CanvasTexture.xml @@ -1,25 +1,36 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CanvasTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Texture with optional normal and specular maps for use in 2D rendering. </brief_description> <description> + [CanvasTexture] is an alternative to [ImageTexture] for 2D rendering. It allows using normal maps and specular maps in any node that inherits from [CanvasItem]. [CanvasTexture] also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings). + [b]Note:[/b] [CanvasTexture] cannot be used in 3D rendering. For physically-based materials in 3D, use [BaseMaterial3D] instead. </description> <tutorials> </tutorials> <members> <member name="diffuse_texture" type="Texture2D" setter="set_diffuse_texture" getter="get_diffuse_texture"> + The diffuse (color) texture to use. This is the main texture you want to set in most cases. </member> <member name="normal_texture" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture"> + The normal map texture to use. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. + [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. </member> <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color(1, 1, 1, 1)"> + The multiplier for specular reflection colors. The [Light2D]'s color is also taken into account when determining the reflection color. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. </member> <member name="specular_shininess" type="float" setter="set_specular_shininess" getter="get_specular_shininess" default="1.0"> + The specular exponent for [Light2D] specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of [code]1.0[/code] disables specular reflections entirely. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. </member> <member name="specular_texture" type="Texture2D" setter="set_specular_texture" getter="get_specular_texture"> + The specular map to use for [Light2D] specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher [member specular_shininess] value. Using a colored [member specular_texture] allows controlling specular shininess on a per-channel basis. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. </member> <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0"> + The texture filtering mode to use when drawing this [CanvasTexture]. </member> <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0"> + The texture repeat mode to use when drawing this [CanvasTexture]. </member> </members> </class> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index ca482a39e0..4c62ab2a7f 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -616,8 +616,8 @@ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)"> Sets the font [Color] when [member TextEdit.editable] is disabled. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> - Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored. </theme_item> <theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)"> [Color] of the main line length guideline, secondary guidelines will have 50% alpha applied. diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index d4c503857d..48b4df9126 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -8,10 +8,10 @@ To get cancel action, you can use: [codeblocks] [gdscript] - get_cancel().connect("pressed", self, "cancelled") + get_cancel_button().pressed.connect(self.cancelled) [/gdscript] [csharp] - GetCancel().Connect("pressed", this, nameof(Cancelled)); + GetCancelButton().Pressed += Cancelled; [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml index a13e1598b2..0e1ef02573 100644 --- a/doc/classes/Container.xml +++ b/doc/classes/Container.xml @@ -14,14 +14,14 @@ <method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const"> <return type="PackedInt32Array" /> <description> - Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock. + Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. </description> </method> <method name="_get_allowed_size_flags_vertical" qualifiers="virtual const"> <return type="PackedInt32Array" /> <description> - Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock. + Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. </description> </method> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 91e9b65a8a..c1fa1a2bf1 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -12,7 +12,7 @@ Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [Control] node can be in focus. Only the node in focus will receive 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. - [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. + [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. [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class. </description> <tutorials> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 85d9fd34ca..de1a92949f 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="DisplayServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Singleton for window management functions. </brief_description> <description> + [DisplayServer] handles everything related to window management. This is separated from [OS] as a single operating system may support multiple display servers. + [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [DisplayServer] will return dummy values in this case. </description> <tutorials> </tutorials> @@ -16,8 +19,8 @@ <method name="clipboard_get_primary" qualifiers="const"> <return type="String" /> <description> - Returns the user's primary clipboard as a string if possible. - [b]Note:[/b] This method is only implemented on Linux. + Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + [b]Note:[/b] This method is only implemented on Linux (X11). </description> </method> <method name="clipboard_has" qualifiers="const"> @@ -37,8 +40,8 @@ <return type="void" /> <param index="0" name="clipboard_primary" type="String" /> <description> - Sets the user's primary clipboard content to the given string. - [b]Note:[/b] This method is only implemented on Linux. + Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + [b]Note:[/b] This method is only implemented on Linux (X11). </description> </method> <method name="create_sub_window"> @@ -48,11 +51,13 @@ <param index="2" name="flags" type="int" /> <param index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" /> <description> + Create a new subwindow (a [Window] whose presence is linked to another window). This window will appear to be embedded within the main window if [member Viewport.gui_embed_subwindows] is [code]true[/code]. Otherwise, the window will appear to be a separate window which can be dragged outside the main window. [code]vsync_mode[/code] is ignored if [member Viewport.gui_embed_subwindows] is [code]true[/code], as the subwindow will be drawn at the same time as the main window in this case. </description> </method> <method name="cursor_get_shape" qualifiers="const"> <return type="int" enum="DisplayServer.CursorShape" /> <description> + Returns the default mouse cursor shape set by [method cursor_set_shape]. </description> </method> <method name="cursor_set_custom_image"> @@ -61,18 +66,21 @@ <param index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" /> <param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" /> <description> + Sets a custom mouse cursor image for the defined [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be [code]256x256[/code] or smaller for correct appearance. [param hotspot] can optionally be set to define the area where the cursor will click. By default, [param hotspot] is set to [code]Vector2(0, 0)[/code], which is the top-left corner of the image. See also [method cursor_set_shape]. </description> </method> <method name="cursor_set_shape"> <return type="void" /> <param index="0" name="shape" type="int" enum="DisplayServer.CursorShape" /> <description> + Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also [method cursor_get_shape] and [method cursor_set_custom_image]. </description> </method> <method name="delete_sub_window"> <return type="void" /> <param index="0" name="window_id" type="int" /> <description> + Removes the subwindow specified by [param window_id]. </description> </method> <method name="dialog_input_text"> @@ -82,6 +90,8 @@ <param index="2" name="existing_text" type="String" /> <param index="3" name="callback" type="Callable" /> <description> + Shows a text input dialog which uses the operating system's native look-and-feel. [param callback] will be called with a [String] argument equal to the text field's contents when the dialog is closed for any reason. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="dialog_show"> @@ -91,17 +101,23 @@ <param index="2" name="buttons" type="PackedStringArray" /> <param index="3" name="callback" type="Callable" /> <description> + Shows a text dialog which uses the operating system's native look-and-feel. [param callback] will be called when the dialog is closed for any reason. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="enable_for_stealing_focus"> <return type="void" /> <param index="0" name="process_id" type="int" /> <description> + Allows the [param process_id] PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. + [b]Note:[/b] This method is implemented on Windows. </description> </method> <method name="force_process_and_drop_events"> <return type="void" /> <description> + Forces window manager processing while ignoring all [InputEvent]s. See also [method process_events]. + [b]Note:[/b] This method is implemented on Windows and macOS. </description> </method> <method name="get_accent_color" qualifiers="const"> @@ -127,27 +143,43 @@ <method name="get_name" qualifiers="const"> <return type="String" /> <description> + Returns the name of the [DisplayServer] currently in use. Most operating systems only have a single [DisplayServer], but Linux has access to more than one [DisplayServer] (although only X11 is currently implemented in Godot). + The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]). </description> </method> <method name="get_screen_count" qualifiers="const"> <return type="int" /> <description> + Returns the number of displays available. </description> </method> <method name="get_swap_cancel_ok"> <return type="bool" /> <description> + Returns [code]true[/code] if positions of [b]OK[/b] and [b]Cancel[/b] buttons are swapped in dialogs. This is enabled by default on Windows and UWP to follow interface conventions, and be toggled by changing [member ProjectSettings.gui/common/swap_cancel_ok]. + [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show]. </description> </method> <method name="get_window_at_screen_position" qualifiers="const"> <return type="int" /> <param index="0" name="position" type="Vector2i" /> <description> + Returns the ID of the window at the specified screen [param position] (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + [codeblock] + * (0, 0) +-------+ + | | + +-------------+ | | + | | | | + | | | | + +-------------+ +-------+ + [/codeblock] </description> </method> <method name="get_window_list" qualifiers="const"> <return type="PackedInt32Array" /> <description> + Returns the list of Godot window IDs belonging to this process. + [b]Note:[/b] Native dialogs are not included in this list. </description> </method> <method name="global_menu_add_check_item"> @@ -665,37 +697,42 @@ <return type="bool" /> <param index="0" name="feature" type="int" enum="DisplayServer.Feature" /> <description> + Returns [code]true[/code] if the specified [param feature] is supported by the current [DisplayServer], [code]false[/code] otherwise. </description> </method> <method name="ime_get_selection" qualifiers="const"> <return type="Vector2i" /> <description> + Returns the text selection in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] composition string, with the [Vector2i]'s [code]x[/code] component being the caret position and [code]y[/code] being the length of the selection. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="ime_get_text" qualifiers="const"> <return type="String" /> <description> + Returns the composition string contained within the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] window. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="is_dark_mode" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if OS is using dark mode. - [b]Note:[/b] This method is implemented on macOS, Windows and Linux. + [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11). </description> </method> <method name="is_dark_mode_supported" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if OS supports dark mode. - [b]Note:[/b] This method is implemented on macOS, Windows and Linux. + [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11). </description> </method> <method name="keyboard_get_current_layout" qualifiers="const"> <return type="int" /> <description> Returns active keyboard layout index. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_keycode_from_physical" qualifiers="const"> @@ -703,14 +740,14 @@ <param index="0" name="keycode" type="int" enum="Key" /> <description> Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_layout_count" qualifiers="const"> <return type="int" /> <description> Returns the number of keyboard layouts. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_layout_language" qualifiers="const"> @@ -718,7 +755,7 @@ <param index="0" name="index" type="int" /> <description> Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index]. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_layout_name" qualifiers="const"> @@ -726,25 +763,27 @@ <param index="0" name="index" type="int" /> <description> Returns the localized name of the keyboard layout at position [param index]. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_set_current_layout"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Sets active keyboard layout. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + Sets the active keyboard layout. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="mouse_get_button_state" qualifiers="const"> <return type="int" enum="MouseButton" /> <description> + Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask]. </description> </method> <method name="mouse_get_mode" qualifiers="const"> <return type="int" enum="DisplayServer.MouseMode" /> <description> + Returns the current mouse mode. See also [method mouse_set_mode]. </description> </method> <method name="mouse_get_position" qualifiers="const"> @@ -757,11 +796,13 @@ <return type="void" /> <param index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" /> <description> + Sets the current mouse mode. See also [method mouse_get_mode]. </description> </method> <method name="process_events"> <return type="void" /> <description> + Perform window manager processing, including input flushing. See also [method force_process_and_drop_events], [method Input.flush_buffered_events] and [member Input.use_accumulated_input]. </description> </method> <method name="screen_get_dpi" qualifiers="const"> @@ -779,7 +820,7 @@ 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. + [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="screen_get_max_scale" qualifiers="const"> @@ -794,12 +835,24 @@ <return type="int" enum="DisplayServer.ScreenOrientation" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the [param screen]'s current orientation. See also [method screen_set_orientation]. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="screen_get_position" qualifiers="const"> <return type="Vector2i" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + [codeblock] + * (0, 0) +-------+ + | | + +-------------+ | | + | | | | + | | | | + +-------------+ +-------+ + [/codeblock] + See also [method screen_get_size]. </description> </method> <method name="screen_get_refresh_rate" qualifiers="const"> @@ -829,29 +882,34 @@ <return type="Vector2i" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the screen's size in pixels. See also [method screen_get_position] and [method screen_get_usable_rect]. </description> </method> <method name="screen_get_usable_rect" qualifiers="const"> <return type="Rect2i" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the portion of the screen that is not obstructed by a status bar in pixels. See also [method screen_get_size]. </description> </method> <method name="screen_is_kept_on" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on]. </description> </method> <method name="screen_is_touchscreen" qualifiers="const"> <return type="bool" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns [code]true[/code] if the screen can send touch events or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code]. </description> </method> <method name="screen_set_keep_on"> <return type="void" /> <param index="0" name="enable" type="bool" /> <description> + Sets whether the screen should never be turned off by the operating system's power-saving measures. See also [method screen_is_kept_on]. </description> </method> <method name="screen_set_orientation"> @@ -859,18 +917,21 @@ <param index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" /> <param index="1" name="screen" type="int" default="-1" /> <description> + Sets the [param screen]'s [param orientation]. See also [method screen_get_orientation]. </description> </method> <method name="set_icon"> <return type="void" /> <param index="0" name="image" type="Image" /> <description> + Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. To use icons in the operating system's native format, use [method set_native_icon] instead. </description> </method> <method name="set_native_icon"> <return type="void" /> <param index="0" name="filename" type="String" /> <description> + Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. The file at [param filename] must be in [code].ico[/code] format on Windows or [code].icns[/code] on macOS. By using specially crafted [code].ico[/code] or [code].icns[/code] icons, [method set_native_icon] allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use [method set_icon] instead. </description> </method> <method name="tablet_get_current_driver" qualifiers="const"> @@ -911,7 +972,7 @@ - [code]name[/code] is voice name. - [code]id[/code] is voice identifier. - [code]language[/code] is language code in [code]lang_Variant[/code] format. [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And [code]Variant[/code] part is an engine dependent string describing country, region or/and dialect. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_get_voices_for_language" qualifiers="const"> @@ -919,35 +980,35 @@ <param index="0" name="language" type="String" /> <description> Returns an [PackedStringArray] of voice identifiers for the [param language]. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_is_paused" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the synthesizer is in a paused state. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_is_speaking" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the synthesizer is generating speech, or have utterance waiting in the queue. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_pause"> <return type="void" /> <description> Puts the synthesizer into a paused state. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_resume"> <return type="void" /> <description> Resumes the synthesizer if it was paused. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_set_utterance_callback"> @@ -959,7 +1020,7 @@ - [code]TTS_UTTERANCE_STARTED[/code], [code]TTS_UTTERANCE_ENDED[/code], and [code]TTS_UTTERANCE_CANCELED[/code] callable's method should take one [int] parameter, the utterance id. - [code]TTS_UTTERANCE_BOUNDARY[/code] callable's method should take two [int] parameters, the index of the character and the utterance id. [b]Note:[/b] The granularity of the boundary callbacks is engine dependent. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_speak"> @@ -978,16 +1039,16 @@ - [param pitch] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice. - [param rate] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative. - [param utterance_id] is passed as a parameter to the callback functions. - [b]Note:[/b] On Windows and Linux, utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. + [b]Note:[/b] On Windows and Linux (X11), utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. [b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_stop"> <return type="void" /> <description> Stops synthesis in progress and removes all utterances from the queue. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="virtual_keyboard_get_height" qualifiers="const"> @@ -1033,12 +1094,14 @@ <param index="0" name="instance_id" type="int" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [Window] instance ID ([method Object.get_instance_id]) the [param window_id] should be attached to. See also [method window_get_attached_instance_id]. </description> </method> <method name="window_can_draw" qualifiers="const"> <return type="bool" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns [code]true[/code] if anything can be drawn in the window specified by [param window_id], [code]false[/code] otherwise. Using the [code]--disable-render-loop[/code] command line argument or a headless build will return [code]false[/code]. </description> </method> <method name="window_get_active_popup" qualifiers="const"> @@ -1051,12 +1114,14 @@ <return type="int" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the [method Object.get_instance_id] of the [Window] the [param window_id] is attached to. also [method window_get_attached_instance_id]. </description> </method> <method name="window_get_current_screen" qualifiers="const"> <return type="int" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the screen the window specified by [param window_id] is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also [method window_set_current_screen]. </description> </method> <method name="window_get_flag" qualifiers="const"> @@ -1071,12 +1136,14 @@ <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the window's maximum size (in pixels). See also [method window_set_max_size]. </description> </method> <method name="window_get_min_size" qualifiers="const"> <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the window's minimum size (in pixels). See also [method window_set_min_size]. </description> </method> <method name="window_get_mode" qualifiers="const"> @@ -1092,7 +1159,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Returns internal structure pointers for use in plugins. - [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. </description> </method> <method name="window_get_popup_safe_rect" qualifiers="const"> @@ -1113,6 +1180,7 @@ <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the size of the window specified by [param window_id] (in pixels), including the borders drawn by the operating system. See also [method window_get_size]. </description> </method> <method name="window_get_safe_title_margins" qualifiers="const"> @@ -1126,6 +1194,7 @@ <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the size of the window specified by [param window_id] (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also [method window_get_real_size], [method window_set_size] and [method window_get_position]. </description> </method> <method name="window_get_vsync_mode" qualifiers="const"> @@ -1153,12 +1222,14 @@ <return type="void" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Moves the window specified by [param window_id] to the foreground, so that it is visible over other windows. </description> </method> <method name="window_request_attention"> <return type="void" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Makes the window specified by [param window_id] request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system. </description> </method> <method name="window_set_current_screen"> @@ -1166,6 +1237,7 @@ <param index="0" name="screen" type="int" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Moves the window specified by [param window_id] to the specified [param screen]. See also [method window_get_current_screen]. </description> </method> <method name="window_set_drop_files_callback"> @@ -1173,6 +1245,8 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id]. + [b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11) and Web. </description> </method> <method name="window_set_exclusive"> @@ -1199,6 +1273,7 @@ <param index="0" name="active" type="bool" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets whether [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] should be enabled for the window specified by [param window_id]. See also [method window_set_ime_position]. </description> </method> <method name="window_set_ime_position"> @@ -1206,6 +1281,7 @@ <param index="0" name="position" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the position of the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] popup for the specified [param window_id]. Only effective if [method window_set_ime_active] was set to [code]true[/code] for the specified [param window_id]. </description> </method> <method name="window_set_input_event_callback"> @@ -1213,6 +1289,7 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id]. </description> </method> <method name="window_set_input_text_callback"> @@ -1220,6 +1297,7 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id]. </description> </method> <method name="window_set_max_size"> @@ -1227,6 +1305,8 @@ <param index="0" name="max_size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_max_size]. + [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> </method> <method name="window_set_min_size"> @@ -1234,8 +1314,9 @@ <param index="0" name="min_size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the minimum size for the given window to [param min_size] (in pixels). + Sets the minimum size for the given window to [param min_size] (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_min_size]. [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size. + [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> </method> <method name="window_set_mode"> @@ -1276,8 +1357,8 @@ DisplayServer.WindowSetMousePassthrough(new Vector2[] {}); [/csharp] [/codeblocks] - [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="window_set_popup_safe_rect"> @@ -1293,7 +1374,16 @@ <param index="0" name="position" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the position of the given window to [param position]. + Sets the position of the given window to [param position]. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + [codeblock] + * (0, 0) +-------+ + | | + +-------------+ | | + | | | | + | | | | + +-------------+ +-------+ + [/codeblock] + See also [method window_get_position] and [method window_set_size]. </description> </method> <method name="window_set_rect_changed_callback"> @@ -1301,6 +1391,7 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized. </description> </method> <method name="window_set_size"> @@ -1308,7 +1399,7 @@ <param index="0" name="size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the size of the given window to [param size]. + Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position]. </description> </method> <method name="window_set_title"> @@ -1317,6 +1408,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Sets the title of the given window to [param title]. + [b]Note:[/b] Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most. </description> </method> <method name="window_set_transient"> @@ -1352,51 +1444,70 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id]. </description> </method> </methods> <constants> <constant name="FEATURE_GLOBAL_MENU" value="0" enum="Feature"> + Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. [b]macOS[/b] </constant> <constant name="FEATURE_SUBWINDOWS" value="1" enum="Feature"> + Display server supports multiple windows that can be moved outside of the main window. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_TOUCHSCREEN" value="2" enum="Feature"> + Display server supports touchscreen input. [b]Windows, Linux (X11), Android, iOS, Web[/b] </constant> <constant name="FEATURE_MOUSE" value="3" enum="Feature"> + Display server supports mouse input. [b]Windows, macOS, Linux (X11), Android, Web[/b] </constant> <constant name="FEATURE_MOUSE_WARP" value="4" enum="Feature"> + Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_CLIPBOARD" value="5" enum="Feature"> + Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b] </constant> <constant name="FEATURE_VIRTUAL_KEYBOARD" value="6" enum="Feature"> + Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. [b]Android, iOS, Web[/b] </constant> <constant name="FEATURE_CURSOR_SHAPE" value="7" enum="Feature"> + Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11), Android, Web[/b] </constant> <constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature"> + Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11), Web[/b] </constant> <constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature"> + Display server supports spawning dialogs using the operating system's native look-and-feel. [b]macOS[/b] </constant> <constant name="FEATURE_IME" value="10" enum="Feature"> + Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature"> + Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_HIDPI" value="12" enum="Feature"> + Display server supports querying the operating system's display scale factor. This allows for [i]reliable[/i] automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). [b]Windows, macOS[/b] </constant> <constant name="FEATURE_ICON" value="13" enum="Feature"> + Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_NATIVE_ICON" value="14" enum="Feature"> + Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS[/b] </constant> <constant name="FEATURE_ORIENTATION" value="15" enum="Feature"> + Display server supports changing the screen orientation. [b]Android, iOS[/b] </constant> <constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature"> + Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature"> + Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11)[/b] </constant> <constant name="FEATURE_TEXT_TO_SPEECH" value="19" enum="Feature"> - Display server supports text-to-speech. See [code]tts_*[/code] methods. + Display server supports text-to-speech. See [code]tts_*[/code] methods. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b] </constant> <constant name="FEATURE_EXTEND_TO_TITLE" value="20" enum="Feature"> - Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. + Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. [b]macOS[/b] </constant> <constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode"> Makes the mouse cursor visible if it is hidden. @@ -1415,24 +1526,34 @@ Confines the mouse cursor to the game window, and make it hidden. </constant> <constant name="SCREEN_OF_MAIN_WINDOW" value="-1"> + Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. </constant> <constant name="MAIN_WINDOW_ID" value="0"> + The ID of the main window spawned by the engine, which can be passed to methods expecting a [code]window_id[/code]. </constant> <constant name="INVALID_WINDOW_ID" value="-1"> + The ID that refers to a nonexisting window. This is be returned by some [DisplayServer] methods if no window matches the requested result. </constant> <constant name="SCREEN_LANDSCAPE" value="0" enum="ScreenOrientation"> + Default landscape orientation. </constant> <constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation"> + Default portrait orienstation. </constant> <constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation"> + Reverse landscape orientation (upside down). </constant> <constant name="SCREEN_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation"> + Reverse portrait orientation (upside down). </constant> <constant name="SCREEN_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation"> + Automatic landscape orientation (default or reverse depending on sensor). </constant> <constant name="SCREEN_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation"> + Automatic portrait orientation (default or reverse depending on sensor). </constant> <constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation"> + Automatic landscape or portrait orientation (default or reverse depending on sensor). </constant> <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType"> Default text virtual keyboard. @@ -1460,40 +1581,58 @@ Virtual keyboard with additional keys to assist with typing URLs. </constant> <constant name="CURSOR_ARROW" value="0" enum="CursorShape"> + Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a [LineEdit] or [TextEdit]. </constant> <constant name="CURSOR_IBEAM" value="1" enum="CursorShape"> + I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as [LineEdit] or [TextEdit]. </constant> <constant name="CURSOR_POINTING_HAND" value="2" enum="CursorShape"> + Pointing hand cursor shape. This is used by default when hovering a [LinkButton] or an URL tag in a [RichTextLabel].â‹… </constant> <constant name="CURSOR_CROSS" value="3" enum="CursorShape"> + Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. </constant> <constant name="CURSOR_WAIT" value="4" enum="CursorShape"> + Wait cursor. On most cursor themes, this displays a spinning icon [i]besides[/i] the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also [constant CURSOR_BUSY]. </constant> <constant name="CURSOR_BUSY" value="5" enum="CursorShape"> + Wait cursor. On most cursor themes, this [i]replaces[/i] the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also [constant CURSOR_WAIT]. </constant> <constant name="CURSOR_DRAG" value="6" enum="CursorShape"> + Dragging hand cursor. This is displayed during drag-and-drop operations. See also [constant CURSOR_CAN_DROP]. </constant> <constant name="CURSOR_CAN_DROP" value="7" enum="CursorShape"> + "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a [Control] that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also [constant CURSOR_DRAG]. </constant> <constant name="CURSOR_FORBIDDEN" value="8" enum="CursorShape"> + Forbidden cursor. This is displayed during drag-and-drop operations if the hovered [Control] can't accept the drag-and-drop event. </constant> <constant name="CURSOR_VSIZE" value="9" enum="CursorShape"> + Vertical resize cursor. Intended to be displayed when the hovered [Control] can be vertically resized using the mouse. See also [constant CURSOR_VSPLIT]. </constant> <constant name="CURSOR_HSIZE" value="10" enum="CursorShape"> + Horizontal resize cursor. Intended to be displayed when the hovered [Control] can be horizontally resized using the mouse. See also [constant CURSOR_HSPLIT]. </constant> <constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape"> + Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse. </constant> <constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape"> + Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse. </constant> <constant name="CURSOR_MOVE" value="13" enum="CursorShape"> + Move cursor. Intended to be displayed when the hovered [Control] can be moved using the mouse. </constant> <constant name="CURSOR_VSPLIT" value="14" enum="CursorShape"> + Vertical split cursor. This is displayed when hovering a [Control] with splits that can be vertically resized using the mouse, such as [VSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_VSIZE]. </constant> <constant name="CURSOR_HSPLIT" value="15" enum="CursorShape"> + Horizontal split cursor. This is displayed when hovering a [Control] with splits that can be horizontally resized using the mouse, such as [HSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_HSIZE]. </constant> <constant name="CURSOR_HELP" value="16" enum="CursorShape"> + Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. </constant> <constant name="CURSOR_MAX" value="17" enum="CursorShape"> + Represents the size of the [enum CursorShape] enum. </constant> <constant name="WINDOW_MODE_WINDOWED" value="0" enum="WindowMode"> Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen). @@ -1505,7 +1644,7 @@ Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. </constant> <constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode"> - Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. + Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux (X11), a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. </constant> <constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode"> @@ -1525,7 +1664,7 @@ <constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags"> The window background can be transparent. [b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code]. - [b]Note:[/b] Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. + [b]Note:[/b] Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. </constant> <constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags"> The window can't be focused. No-focus window will ignore all input, except mouse clicks. @@ -1570,26 +1709,26 @@ [b]Note:[/b] This flag is implemented on macOS. </constant> <constant name="VSYNC_DISABLED" value="0" enum="VSyncMode"> - No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). + No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]). </constant> <constant name="VSYNC_ENABLED" value="1" enum="VSyncMode"> - Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). + Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]). </constant> <constant name="VSYNC_ADAPTIVE" value="2" enum="VSyncMode"> - Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible), otherwise vertical synchronization is enabled to avoid tearing. + Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]). </constant> <constant name="VSYNC_MAILBOX" value="3" enum="VSyncMode"> - Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). - Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag. + Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]). + Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered. </constant> <constant name="DISPLAY_HANDLE" value="0" enum="HandleType"> Display handle: - - Linux: [code]X11::Display*[/code] for the display. + - Linux (X11): [code]X11::Display*[/code] for the display. </constant> <constant name="WINDOW_HANDLE" value="1" enum="HandleType"> Window handle: - Windows: [code]HWND[/code] for the window. - - Linux: [code]X11::Window*[/code] for the window. + - Linux (X11): [code]X11::Window*[/code] for the window. - macOS: [code]NSWindow*[/code] for the window. - iOS: [code]UIViewController*[/code] for the view controller. - Android: [code]jObject[/code] for the activity. diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index e216059364..99e97fc25f 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -28,7 +28,7 @@ <return type="bool" /> <param index="0" name="class_name" type="StringName" /> <description> - Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. + Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="is_class_property_disabled" qualifiers="const"> @@ -36,7 +36,7 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="property" type="StringName" /> <description> - Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name]. + Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name]. </description> </method> <method name="is_feature_disabled" qualifiers="const"> @@ -73,7 +73,7 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="disable" type="bool" /> <description> - If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. + If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="set_disable_class_property"> @@ -82,7 +82,7 @@ <param index="1" name="property" type="StringName" /> <param index="2" name="disable" type="bool" /> <description> - If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name]. + If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name]. </description> </method> <method name="set_disable_feature"> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index a1a43dd5bf..108c670f59 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -33,7 +33,7 @@ <signal name="object_id_selected"> <param index="0" name="id" type="int" /> <description> - Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector. + Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. </description> </signal> <signal name="property_deleted"> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index c8a499260e..ba2f7b24bf 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Plugin for adding custom property editors on inspector. + Plugin for adding custom property editors on the inspector. </brief_description> <description> [EditorInspectorPlugin] allows adding custom property editors to [EditorInspector]. diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 818dda59bc..799bd45cee 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -196,10 +196,10 @@ The thumbnail size to use in the FileSystem dock (in pixels). See also [member filesystem/file_dialog/thumbnail_size]. </member> <member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter=""> - The refresh interval to use for the inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time. + The refresh interval to use for the Inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time. </member> <member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter=""> - The tint intensity to use for the subresources background in the inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. + The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. </member> <member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter=""> If [code]true[/code], the scene tree dock will automatically unfold nodes when a node that has folded parents is selected. diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index 3a397f56a9..4670e0c382 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -12,7 +12,7 @@ var expression = Expression.new() func _ready(): - $LineEdit.connect("text_submitted", self, "_on_text_submitted") + $LineEdit.text_submitted.connect(self._on_text_submitted) func _on_text_submitted(command): var error = expression.parse(command) @@ -28,7 +28,7 @@ public override void _Ready() { - GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered)); + GetNode("LineEdit").TextSubmitted += OnTextEntered; } private void OnTextEntered(string command) diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 043c08eed5..4916171900 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -9,7 +9,8 @@ </description> <tutorials> <link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link> - <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="2D Particles Demo">https://godotengine.org/asset-library/asset/118</link> + <link title="2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player)">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="capture_rect" qualifiers="const"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 56b95fc755..89d52caa02 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -157,7 +157,7 @@ <method name="get_mouse_button_mask" qualifiers="const"> <return type="int" enum="MouseButton" /> <description> - Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. + Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state]. </description> </method> <method name="get_vector" qualifiers="const"> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index fb50454917..346b6bf732 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -11,6 +11,9 @@ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link> </tutorials> <members> + <member name="double_tap" type="bool" setter="set_double_tap" getter="is_double_tap" default="false"> + If [code]true[/code], the touch's state is a double tap. + </member> <member name="index" type="int" setter="set_index" getter="get_index" default="0"> The touch index in the case of a multi-touch event. One index = one finger. </member> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index e9ebbc0a41..60e20cd97d 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -55,6 +55,7 @@ </member> <member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0"> The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code]. + [b]Note:[/b] [member light_angular_distance] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="2"> The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See [enum BakeMode]. @@ -91,6 +92,7 @@ </member> <member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0"> The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent. + [b]Note:[/b] [member light_size] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> <member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5"> The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml index f2509ad2b2..1652dd52aa 100644 --- a/doc/classes/MovieWriter.xml +++ b/doc/classes/MovieWriter.xml @@ -4,7 +4,7 @@ Abstract class for non-real-time video recording encoders. </brief_description> <description> - Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] command line argument, this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. + Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. Godot has 2 built-in [MovieWriter]s: - AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most. - PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent. @@ -46,7 +46,7 @@ <param index="1" name="fps" type="int" /> <param index="2" name="base_path" type="String" /> <description> - Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] command line argument. + Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </description> </method> <method name="_write_end" qualifiers="virtual"> diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index 0f57ff9e55..ba6c60a088 100644 --- a/doc/classes/MultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -25,10 +25,22 @@ Returns the current state of the connection. See [enum ConnectionStatus]. </description> </method> + <method name="get_packet_channel" qualifiers="const"> + <return type="int" /> + <description> + Returns the channel over which the next available packet was received. See [method PacketPeer.get_available_packet_count]. + </description> + </method> + <method name="get_packet_mode" qualifiers="const"> + <return type="int" enum="MultiplayerPeer.TransferMode" /> + <description> + Returns the [enum MultiplayerPeer.TransferMode] the remote peer used to send the next available packet. See [method PacketPeer.get_available_packet_count]. + </description> + </method> <method name="get_packet_peer" qualifiers="const"> <return type="int" /> <description> - Returns the ID of the [MultiplayerPeer] who sent the most recent packet. + Returns the ID of the [MultiplayerPeer] who sent the next available packet. See [method PacketPeer.get_available_packet_count]. </description> </method> <method name="get_unique_id" qualifiers="const"> @@ -37,6 +49,12 @@ Returns the ID of this [MultiplayerPeer]. </description> </method> + <method name="is_server_relay_supported" qualifiers="const"> + <return type="bool" /> + <description> + Returns true if the server can act as a relay in the current configuration (i.e. if the higher level [MultiplayerAPI] should notify connected clients of other peers, and implement a relay protocol to allow communication between them). + </description> + </method> <method name="poll"> <return type="void" /> <description> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 3437e0eca4..a69491ec66 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -163,7 +163,7 @@ </description> </signal> <signal name="velocity_computed"> - <param index="0" name="safe_velocity" type="Vector3" /> + <param index="0" name="safe_velocity" type="Vector2" /> <description> Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true. </description> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 620895d8d8..bf52c55d67 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -39,7 +39,7 @@ <method name="_get_configuration_warnings" qualifiers="virtual const"> <return type="PackedStringArray" /> <description> - The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script. + The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script. Returning an empty array produces no warnings. Call [method update_configuration_warnings] when the warnings need to be updated for this node. </description> @@ -560,7 +560,7 @@ <method name="print_tree_pretty"> <return type="void" /> <description> - Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. + Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. [b]Example output:[/b] [codeblock] â”–â•´TheGame diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 3df7ec931f..bc2570b183 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -296,6 +296,7 @@ <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)"> Scale part of the local transformation. [b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative. + [b]Note:[/b] Not all nodes are visually scaled by the [member scale] property. For example, [Light3D]s are not visually affected by [member scale]. </member> <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 3aa26cbb21..0c74690924 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -4,7 +4,8 @@ Operating System functions. </brief_description> <description> - Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. + Operating System functions. [OS] wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. + [b]Note:[/b] In Godot 4, [OS] functions related to window management were moved to the [DisplayServer] singleton. </description> <tutorials> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> @@ -451,7 +452,7 @@ Returns the video adapter driver name and version for the user's currently active graphics card. The first element holds the driver name, such as [code]nvidia[/code], [code]amdgpu[/code], etc. The second element holds the driver version. For e.g. the [code]nvidia[/code] driver on a Linux/BSD platform, the version is in the format [code]510.85.02[/code]. For Windows, the driver's format is [code]31.0.15.1659[/code]. - [b]Note:[/b] This method is only supported on the platforms Linux/BSD and Windows. It returns an empty array on other platforms. + [b]Note:[/b] This method is only supported on the platforms Linux/BSD and Windows when not running in headless mode. It returns an empty array on other platforms. </description> </method> <method name="has_environment" qualifiers="const"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index e663f47ddf..34cf259f63 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -384,7 +384,7 @@ <description> Returns the object's metadata entry for the given [param name]. Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). See also [method has_meta], [method set_meta] and [method remove_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="get_meta_list" qualifiers="const"> @@ -430,7 +430,7 @@ <param index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="has_method" qualifiers="const"> @@ -502,7 +502,7 @@ <param index="0" name="name" type="StringName" /> <description> Removes a given entry from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="set"> @@ -566,7 +566,7 @@ <description> Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value. To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. See also [method has_meta] and [method get_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="set_script"> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 0bebc7ea43..bc16fba500 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -42,7 +42,7 @@ </member> <member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder"> The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the [b]Bake Occluders[/b] button at the top of the editor. - You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the inspector. + You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the Inspector. Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D]. </member> </members> diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml index ce63dbdbc1..193ae8deeb 100644 --- a/doc/classes/OmniLight3D.xml +++ b/doc/classes/OmniLight3D.xml @@ -15,6 +15,7 @@ </member> <member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0"> The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius. + [b]Note:[/b] [member omni_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1"> See [enum ShadowMode]. diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 12f8055180..a3fc326351 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -92,6 +92,7 @@ [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference. </member> <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[]"> + The list of polygons, in case more than one is being represented. Every individual polygon is stored as a [PackedInt32Array] where each [int] is an index to a point in [member polygon]. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in [member polygon], using the order they are stored in. </member> <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath("")"> </member> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 23287f4de1..c99760996f 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -533,6 +533,8 @@ <param index="0" name="id" type="int" /> <description> Emitted when an item of some [param id] is pressed or its accelerator is activated. + + [b]Note:[/b] If [param id] is negative (either explicitly or due to overflow), this will return the correponding index instead. </description> </signal> <signal name="index_pressed"> diff --git a/doc/classes/PortableCompressedTexture2D.xml b/doc/classes/PortableCompressedTexture2D.xml index c7e2f2fbdc..a0492f2c07 100644 --- a/doc/classes/PortableCompressedTexture2D.xml +++ b/doc/classes/PortableCompressedTexture2D.xml @@ -22,7 +22,7 @@ <description> Initializes the compressed texture from a base image. The compression mode must be provided. If this image will be used as a normal map, the "normal map" flag is recommended, to ensure optimum quality. - If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WEBP compression quality. + If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality. </description> </method> <method name="get_compression_mode" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index a8080c70c6..925d4ec7c4 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -251,7 +251,7 @@ Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false"> - If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] command line argument. See also [member application/run/disable_stderr]. + If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. See also [member application/run/disable_stderr]. Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false"> @@ -297,7 +297,7 @@ <member name="audio/driver/driver" type="String" setter="" getter=""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer. - [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] command line argument. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false"> If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. @@ -480,7 +480,7 @@ Print GPU profile information to standard output every second. This includes how long each frame takes the GPU to render on average, broken down into different steps of the render pipeline, such as CanvasItems, shadows, glow, etc. </member> <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> - Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose]. + Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose]. </member> <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)"> Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. @@ -630,7 +630,7 @@ </member> <member name="editor/movie_writer/fps" type="int" setter="" getter="" default="60"> The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher [member editor/movie_writer/fps] values. Certain FPS values will require you to adjust [member editor/movie_writer/mix_rate] to prevent audio from desynchronizing over time. - This can be specified manually on the command line using the [code]--fixed-fps <fps>[/code] command line argument. + This can be specified manually on the command line using the [code]--fixed-fps <fps>[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="editor/movie_writer/mix_rate" type="int" setter="" getter="" default="48000"> The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from [member audio/driver/mix_rate], but this value must be divisible by [member editor/movie_writer/fps] to prevent audio from desynchronizing over time. @@ -694,7 +694,8 @@ Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden. </member> <member name="gui/common/swap_cancel_ok" type="bool" setter="" getter=""> - If [code]true[/code], swaps Cancel and OK buttons in dialogs on Windows and UWP to follow interface conventions. + If [code]true[/code], swaps [b]Cancel[/b] and [b]OK[/b] buttons in dialogs on Windows and UWP to follow interface conventions. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time. + [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show]. </member> <member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024"> Maximum undo/redo history size for [TextEdit] fields. @@ -830,6 +831,13 @@ </member> <member name="input/ui_swap_input_direction" type="Dictionary" setter="" getter=""> </member> + <member name="input/ui_text_add_selection_for_next_occurrence" type="Dictionary" setter="" getter=""> + If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence. + If no selection is currently active with the last caret in text fields, selects the word currently under the caret. + The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets. + The viewport is adjusted to the latest newly added caret. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. + </member> <member name="input/ui_text_backspace" type="Dictionary" setter="" getter=""> Default [InputEventAction] to delete the character before the text cursor. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. @@ -848,6 +856,18 @@ <member name="input/ui_text_backspace_word.macos" type="Dictionary" setter="" getter=""> macOS specific override for the shortcut to delete a word. </member> + <member name="input/ui_text_caret_add_above" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to add an additional caret above every caret of a text + </member> + <member name="input/ui_text_caret_add_above.macos" type="Dictionary" setter="" getter=""> + macOS specific override for the shortcut to add a caret above every caret + </member> + <member name="input/ui_text_caret_add_below" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to add an additional caret below every caret of a text + </member> + <member name="input/ui_text_caret_add_below.macos" type="Dictionary" setter="" getter=""> + macOS specific override for the shortcut to add a caret below every caret + </member> <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter=""> Default [InputEventAction] to move the text cursor the the end of the text. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. @@ -984,7 +1004,7 @@ </member> <member name="input/ui_text_select_word_under_caret" type="Dictionary" setter="" getter=""> If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection. - [b]Note:[/b] Currently, this is only implemented in [TextEdit], not [LineEdit]. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> <member name="input/ui_text_submit" type="Dictionary" setter="" getter=""> Default [InputEventAction] to submit a text field. @@ -1010,7 +1030,7 @@ </member> <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. - [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] command line argument. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> Override for [member input_devices/pen_tablet/driver] on Windows. @@ -1075,8 +1095,8 @@ <member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default=""""> Specifies the [TextServer] to use. If left empty, the default will be used. "ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. - [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] command line argument. - [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] command line argument. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. + [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -1811,7 +1831,9 @@ Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled]. </member> <member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false"> - If [code]true[/code], uses a fast post-processing dithering filter on the default screen [Viewport] to make banding significantly less visible. In some cases, the dithering pattern may be slightly noticable. Note that this will make losslessly compressed (PNG etc.) screenshots larger. + If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is [i]not[/i] affected by debanding unless the [member Environment.background_mode] is [constant Environment.BG_CANVAS]. + In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. + [b]Note:[/b] This property is only read when the project starts. To set debanding at run-time, set [member Viewport.use_debanding] on the root [Viewport] instead. </member> <member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false"> Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see [member rendering/textures/default_filters/texture_mipmap_bias]). diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index eb85a4adb4..51c2498ea7 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -1581,6 +1581,10 @@ </constant> <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z" value="34" enum="Limit"> </constant> + <constant name="LIMIT_MAX_VIEWPORT_DIMENSIONS_X" value="35" enum="Limit"> + </constant> + <constant name="LIMIT_MAX_VIEWPORT_DIMENSIONS_Y" value="36" enum="Limit"> + </constant> <constant name="MEMORY_TEXTURES" value="0" enum="MemoryType"> </constant> <constant name="MEMORY_BUFFERS" value="1" enum="MemoryType"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 6aa9237385..35fe7bdbd2 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -13,6 +13,7 @@ Similarly, in 2D, a canvas is needed to draw all canvas items. In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. + [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [RenderingServer] will return dummy values in this case. </description> <tutorials> <link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link> @@ -4576,9 +4577,11 @@ </constant> <constant name="CANVAS_GROUP_MODE_DISABLED" value="0" enum="CanvasGroupMode"> </constant> - <constant name="CANVAS_GROUP_MODE_OPAQUE" value="1" enum="CanvasGroupMode"> + <constant name="CANVAS_GROUP_MODE_CLIP_ONLY" value="1" enum="CanvasGroupMode"> </constant> - <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="2" enum="CanvasGroupMode"> + <constant name="CANVAS_GROUP_MODE_CLIP_AND_DRAW" value="2" enum="CanvasGroupMode"> + </constant> + <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="3" enum="CanvasGroupMode"> </constant> <constant name="CANVAS_LIGHT_MODE_POINT" value="0" enum="CanvasLightMode"> </constant> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 05bfcf3446..1f2af6d157 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -24,6 +24,15 @@ Returns whether the given resource object can be saved by this saver. </description> </method> + <method name="_recognize_path" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="resource" type="Resource" /> + <param index="1" name="path" type="String" /> + <description> + Returns [code]true[/code] if this saver handles a given save path and [code]false[/code] otherwise. + If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions]. + </description> + </method> <method name="_save" qualifiers="virtual"> <return type="int" /> <param index="0" name="resource" type="Resource" /> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index b5a917b2bb..760861272f 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -479,9 +479,6 @@ <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. </member> - <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> - If [code]true[/code], the label uses the custom font color. - </member> <member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000"> The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely. [b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled. @@ -629,8 +626,8 @@ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default tint of text outline. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> - The color of selected text, used when [member selection_enabled] is [code]true[/code]. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + The color of selected text, used when [member selection_enabled] is [code]true[/code]. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored. </theme_item> <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The color of the font's shadow. diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index 62cb55daec..28e2ef0d95 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -14,6 +14,7 @@ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.03" /> <member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0"> The spotlight's angle in degrees. + [b]Note:[/b] [member spot_angle] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> <member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param" default="1.0"> The spotlight's angular attenuation curve. @@ -23,6 +24,7 @@ </member> <member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0"> The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range. + [b]Note:[/b] [member spot_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> </members> </class> diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml index bd6e5cdfa2..0f6a3168eb 100644 --- a/doc/classes/StandardMaterial3D.xml +++ b/doc/classes/StandardMaterial3D.xml @@ -4,7 +4,7 @@ Physically based rendering (PBR) material that can be applied to 3D objects. </brief_description> <description> - StandardMaterial3D's properties are inherited from [BaseMaterial3D]. + [StandardMaterial3D]'s properties are inherited from [BaseMaterial3D]. [StandardMaterial3D] uses separate textures for ambient occlusion, roughness and metallic maps. To use a single ORM map for all 3 textures, use an [ORMMaterial3D] instead. </description> <tutorials> <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index b1fda25ecd..d4f5233438 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -63,6 +63,13 @@ Adds a new caret at the given location. Returns the index of the new caret, or [code]-1[/code] if the location is invalid. </description> </method> + <method name="add_caret_at_carets"> + <return type="void" /> + <param index="0" name="below" type="bool" /> + <description> + Adds an additional caret above or below every caret. If [param below] is true the new caret will be added below and above otherwise. + </description> + </method> <method name="add_gutter"> <return type="void" /> <param index="0" name="at" type="int" default="-1" /> @@ -70,6 +77,12 @@ Register a new gutter to this [TextEdit]. Use [param at] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right. </description> </method> + <method name="add_selection_for_next_occurrence"> + <return type="void" /> + <description> + Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret. + </description> + </method> <method name="adjust_carets_after_edit"> <return type="void" /> <param index="0" name="caret" type="int" /> @@ -1097,9 +1110,6 @@ The width, in pixels, of the minimap. </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" /> - <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> - If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text. - </member> <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default=""""> Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]). </member> @@ -1363,8 +1373,8 @@ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)"> Sets the font [Color] when [member editable] is disabled. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> - Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored. </theme_item> <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)"> [Color] of the border around text that matches the search query. diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index 471c1a9040..d1dfdecbd2 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -144,6 +144,7 @@ </methods> <members> <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0"> + Sets text alignment within the line as if the line was horizontal. </member> <member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0"> Text writing direction. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 81e8dd2260..1a2cdfe10e 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -183,7 +183,7 @@ <method name="is_normalized" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. + Returns [code]true[/code] if the vector is [method normalized], [code]false[/code] otherwise. </description> </method> <method name="is_zero_approx" qualifiers="const"> @@ -244,18 +244,22 @@ <method name="normalized" qualifiers="const"> <return type="Vector3" /> <description> - Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. + Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized]. </description> </method> <method name="octahedron_decode" qualifiers="static"> <return type="Vector3" /> <param index="0" name="uv" type="Vector2" /> <description> + Returns the [Vector3] from an octahedral-compressed form created using [method octahedron_encode] (stored as a [Vector2]). </description> </method> <method name="octahedron_encode" qualifiers="const"> <return type="Vector2" /> <description> + Returns the octahedral-encoded (oct32) form of this [Vector3] as a [Vector2]. Since a [Vector2] occupies 1/3 less memory compared to [Vector3], this form of compression can be used to pass greater amounts of [method normalized] [Vector3]s without increasing storage or memory requirements. See also [method octahedron_decode]. + [b]Note:[/b] [method octahedron_encode] can only be used for [method normalized] vectors. [method octahedron_encode] does [i]not[/i] check whether this [Vector3] is normalized, and will return a value that does not decompress to the original value if the [Vector3] is not normalized. + [b]Note:[/b] Octahedral compression is [i]lossy[/i], although visual differences are rarely perceptible in real world scenarios. </description> </method> <method name="outer" qualifiers="const"> diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index 3eea93ce1f..e9ac5b9475 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -133,12 +133,20 @@ <return type="Vector4i" /> <param index="0" name="right" type="Vector4i" /> <description> + Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers. + [codeblock] + print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints "(3, -4, 3, 0)" + [/codeblock] </description> </operator> <operator name="operator %"> <return type="Vector4i" /> <param index="0" name="right" type="int" /> <description> + Gets the remainder of each component of the [Vector4i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers. + [codeblock] + print(Vector4i(10, -20, 30, -40) % 7) # Prints "(3, -6, 2, -5)" + [/codeblock] </description> </operator> <operator name="operator *"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index fce94fe567..5706d098e8 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -306,6 +306,8 @@ If [code]true[/code], the viewport should render its background as transparent. </member> <member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false"> + If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is [i]not[/i] affected by debanding unless the [member Environment.background_mode] is [constant Environment.BG_CANVAS]. See also [member ProjectSettings.rendering/anti_aliasing/quality/use_debanding]. + In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. </member> <member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false"> If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead. diff --git a/doc/classes/VisualShaderNodeFloatParameter.xml b/doc/classes/VisualShaderNodeFloatParameter.xml index c0fd88294a..3b5bf57b4d 100644 --- a/doc/classes/VisualShaderNodeFloatParameter.xml +++ b/doc/classes/VisualShaderNodeFloatParameter.xml @@ -16,7 +16,7 @@ Enables usage of the [member default_value]. </member> <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatParameter.Hint" default="0"> - A hint applied to the uniform, which controls the values it can take when set through the inspector. + A hint applied to the uniform, which controls the values it can take when set through the Inspector. </member> <member name="max" type="float" setter="set_max" getter="get_max" default="1.0"> Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. diff --git a/doc/classes/VisualShaderNodeParameter.xml b/doc/classes/VisualShaderNodeParameter.xml index c66022f77d..55b10ac810 100644 --- a/doc/classes/VisualShaderNodeParameter.xml +++ b/doc/classes/VisualShaderNodeParameter.xml @@ -4,7 +4,7 @@ A base type for the parameters within the visual shader graph. </brief_description> <description> - A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the inspector or from a script. + A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the Inspector or from a script. </description> <tutorials> </tutorials> diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml index 92b2e66e5a..bd9df18394 100644 --- a/doc/classes/VoxelGIData.xml +++ b/doc/classes/VoxelGIData.xml @@ -5,7 +5,7 @@ </brief_description> <description> [VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again. - [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the inspector then choosing [b]Save As...[/b]. + [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the Inspector then choosing [b]Save As...[/b]. </description> <tutorials> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index d7232bb0e9..e3938fb5d5 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -114,12 +114,17 @@ <return type="Vector4" /> <param index="0" name="right" type="Vector4" /> <description> + Multiplies each component of the [Vector4] by the given [float]. </description> </operator> <operator name="operator *"> <return type="Vector4" /> <param index="0" name="right" type="Vector4i" /> <description> + Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4]. + [codeblock] + print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)" + [/codeblock] </description> </operator> <operator name="operator *"> @@ -140,12 +145,20 @@ <return type="float" /> <param index="0" name="right" type="float" /> <description> + Raises a [float] to a power of a [float]. + [codeblock] + print(39.0625**0.25) # 2.5 + [/codeblock] </description> </operator> <operator name="operator **"> <return type="float" /> <param index="0" name="right" type="int" /> <description> + Raises a [float] to a power of an [int]. The result is a [float]. + [codeblock] + print(0.9**3) # 0.729 + [/codeblock] </description> </operator> <operator name="operator +"> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 868a8e9944..689cb7fe8e 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -161,12 +161,14 @@ <return type="Vector4" /> <param index="0" name="right" type="Vector4" /> <description> + Multiplies each component of the [Vector4] by the given [int]. </description> </operator> <operator name="operator *"> <return type="Vector4i" /> <param index="0" name="right" type="Vector4i" /> <description> + Multiplies each component of the [Vector4i] by the given [int]. </description> </operator> <operator name="operator *"> @@ -187,12 +189,20 @@ <return type="float" /> <param index="0" name="right" type="float" /> <description> + Raises an [int] to a power of a [float]. The result is a [float]. + [codeblock] + print(8**0.25) # 1.68179283050743 + [/codeblock] </description> </operator> <operator name="operator **"> <return type="int" /> <param index="0" name="right" type="int" /> <description> + Raises an [int] to a power of a [int]. + [codeblock] + print(5**5) # 3125 + [/codeblock] </description> </operator> <operator name="operator +"> |