diff options
Diffstat (limited to 'doc')
40 files changed, 287 insertions, 59 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 4048b483e8..475d166925 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2460,7 +2460,7 @@ </constant> <constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint"> Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code]. - Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "noslider" to hide the slider. + Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "no_slider" to hide the slider. </constant> <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint"> Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string. diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml index 7ae0b06dad..43fa9d6ad3 100644 --- a/doc/classes/AudioEffectAmplify.xml +++ b/doc/classes/AudioEffectAmplify.xml @@ -2,12 +2,12 @@ <class name="AudioEffectAmplify" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Adds an amplifying audio effect to an audio bus. - Increases or decreases the volume of the selected audio bus. </brief_description> <description> Increases or decreases the volume being routed through the audio bus. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml index 3635f122f2..4efa431714 100644 --- a/doc/classes/AudioEffectBandLimitFilter.xml +++ b/doc/classes/AudioEffectBandLimitFilter.xml @@ -7,5 +7,6 @@ Limits the frequencies in a range around the [member AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to pass. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml index 5e7713f3d4..6820b2c9f8 100644 --- a/doc/classes/AudioEffectBandPassFilter.xml +++ b/doc/classes/AudioEffectBandPassFilter.xml @@ -7,5 +7,6 @@ Attenuates the frequencies inside of a range around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index 7a7f1f8e8a..8e02056456 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -8,6 +8,7 @@ Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <methods> <method name="can_get_buffer" qualifiers="const"> diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml index ca04126da4..5efba17e6a 100644 --- a/doc/classes/AudioEffectChorus.xml +++ b/doc/classes/AudioEffectChorus.xml @@ -7,6 +7,7 @@ Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <methods> <method name="get_voice_cutoff_hz" qualifiers="const"> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index 5ad948feba..8793ec0a02 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -13,6 +13,7 @@ - Accentuates transients by using a wider attack, making effects sound more punchy. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0"> diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index 8a95e315cd..8223ccd6bd 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -8,6 +8,7 @@ Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0"> diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml index 908ae956ed..ce5b6de3be 100644 --- a/doc/classes/AudioEffectEQ.xml +++ b/doc/classes/AudioEffectEQ.xml @@ -8,6 +8,7 @@ AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <methods> <method name="get_band_count" qualifiers="const"> diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml index 0b03ea99dd..8cf53b9df2 100644 --- a/doc/classes/AudioEffectEQ10.xml +++ b/doc/classes/AudioEffectEQ10.xml @@ -19,5 +19,6 @@ See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21]. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml index 6861a74596..2eed3b4836 100644 --- a/doc/classes/AudioEffectEQ21.xml +++ b/doc/classes/AudioEffectEQ21.xml @@ -30,5 +30,6 @@ See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10]. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml index 5aea8efaa9..816d4b9b38 100644 --- a/doc/classes/AudioEffectEQ6.xml +++ b/doc/classes/AudioEffectEQ6.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. + Adds a 6-band equalizer audio effect to an audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. Each frequency can be modulated between -60/+24 dB. </brief_description> <description> @@ -15,5 +15,6 @@ See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21]. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml index 02d8dbfffc..53e6f3ca63 100644 --- a/doc/classes/AudioEffectHighPassFilter.xml +++ b/doc/classes/AudioEffectHighPassFilter.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Adds a high-pass filter to the Audio Bus. + Adds a high-pass filter to the audio bus. </brief_description> <description> Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and allows higher frequencies to pass. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml index bb5cf5c4a0..f2c20862fb 100644 --- a/doc/classes/AudioEffectHighShelfFilter.xml +++ b/doc/classes/AudioEffectHighShelfFilter.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz]. + Adds a high-shelf filter to the audio bus. </brief_description> <description> + Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz]. </description> <tutorials> <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml index 3fd099b55e..e841889b2a 100644 --- a/doc/classes/AudioEffectLimiter.xml +++ b/doc/classes/AudioEffectLimiter.xml @@ -8,6 +8,7 @@ Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1"> diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml index 8a9ca04354..b0577f19c3 100644 --- a/doc/classes/AudioEffectLowPassFilter.xml +++ b/doc/classes/AudioEffectLowPassFilter.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Adds a low-pass filter to the Audio bus. + Adds a low-pass filter to the audio bus. </brief_description> <description> Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and allows lower frequencies to pass. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml index 04cc1ab1d8..f654ba3612 100644 --- a/doc/classes/AudioEffectLowShelfFilter.xml +++ b/doc/classes/AudioEffectLowShelfFilter.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz]. + Adds a low-shelf filter to the audio bus. </brief_description> <description> + Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz]. </description> <tutorials> <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml index a2cc764003..ad4577cfbc 100644 --- a/doc/classes/AudioEffectNotchFilter.xml +++ b/doc/classes/AudioEffectNotchFilter.xml @@ -7,5 +7,6 @@ Attenuates frequencies in a narrow band around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> </class> diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml index 1dd2d9fa27..291e86214e 100644 --- a/doc/classes/AudioEffectPanner.xml +++ b/doc/classes/AudioEffectPanner.xml @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPanner" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Adds a panner audio effect to an Audio bus. Pans sound left or right. + Adds a panner audio effect to an audio bus. Pans sound left or right. </brief_description> <description> Determines how much of an audio signal is sent to the left and right buses. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0"> diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml index 9c10052b6a..7aaf404352 100644 --- a/doc/classes/AudioEffectPhaser.xml +++ b/doc/classes/AudioEffectPhaser.xml @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPhaser" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Adds a phaser audio effect to an Audio bus. + Adds a phaser audio effect to an audio bus. Combines the original signal with a copy that is slightly out of phase with the original. </brief_description> <description> Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0"> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index aab380aa72..952d432879 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Adds a pitch-shifting audio effect to an Audio bus. + Adds a pitch-shifting audio effect to an audio bus. Raises or lowers the pitch of original sound. </brief_description> <description> Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3"> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index 5525102806..b024f06849 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -2,12 +2,12 @@ <class name="AudioEffectReverb" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Adds a reverberation audio effect to an Audio bus. - Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. </brief_description> <description> - Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room. + Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <members> diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml index 5c62ba982f..088d61189f 100644 --- a/doc/classes/AudioEffectStereoEnhance.xml +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -7,6 +7,7 @@ An audio effect that can be used to adjust the intensity of stereo panning. </description> <tutorials> + <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link> </tutorials> <members> <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0"> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 53d35c1a3d..75a715789c 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -6,7 +6,7 @@ <description> Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility. See also [BaseButton] which contains common properties and methods associated with this node. - [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.minimum_size] to a big enough value to give the button enough space. + [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.custom_minimum_size] to a big enough value to give the button enough space. </description> <tutorials> <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 2828896eac..2846b564b4 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -100,7 +100,7 @@ <method name="_get_minimum_size" qualifiers="virtual const"> <return type="Vector2" /> <description> - Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). + Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member custom_minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). If not overridden, defaults to [constant Vector2.ZERO]. [b]Note:[/b] This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc. </description> @@ -157,7 +157,7 @@ Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property. The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead. The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member hint_tooltip] for an example). - [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member minimum_size] to some non-zero value. + [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value. [b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. Example of usage with a custom-constructed node: [codeblocks] @@ -357,7 +357,7 @@ <method name="get_combined_minimum_size" qualifiers="const"> <return type="Vector2" /> <description> - Returns combined minimum size from [member minimum_size] and [method get_minimum_size]. + Returns combined minimum size from [member custom_minimum_size] and [method get_minimum_size]. </description> </method> <method name="get_cursor_shape" qualifiers="const"> @@ -389,7 +389,7 @@ <method name="get_minimum_size" qualifiers="const"> <return type="Vector2" /> <description> - Returns the minimum size for this control. See [member minimum_size]. + Returns the minimum size for this control. See [member custom_minimum_size]. </description> </method> <method name="get_offset" qualifiers="const"> @@ -939,7 +939,7 @@ <method name="update_minimum_size"> <return type="void" /> <description> - Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member minimum_size] directly calls this method automatically. + Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member custom_minimum_size] directly calls this method automatically. </description> </method> <method name="warp_mouse"> @@ -970,6 +970,9 @@ <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false"> Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input. </member> + <member name="custom_minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)"> + The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. + </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0"> The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. </member> @@ -1027,9 +1030,6 @@ <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0"> Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). </member> - <member name="minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)"> - The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. - </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0"> The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system. diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 641d73e333..166923314f 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -15,7 +15,7 @@ # Create an HTTP request node and connect its completion signal. var http_request = HTTPRequest.new() add_child(http_request) - http_request.connect("request_completed", self, "_http_request_completed") + http_request.request_completed.connect(self._http_request_completed) # Perform a GET request. The URL below returns JSON as of writing. var error = http_request.request("https://httpbin.org/get") @@ -25,7 +25,7 @@ # Perform a POST request. The URL below returns JSON as of writing. # Note: Don't make simultaneous requests using a single HTTPRequest node. # The snippet below is provided for reference only. - var body = {"name": "Godette"} + var body = JSON.new().stringify({"name": "Godette"}) error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body) if error != OK: push_error("An error occurred in the HTTP request.") @@ -33,7 +33,9 @@ # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): - var response = parse_json(body.get_string_from_utf8()) + var json = JSON.new() + json.parse(body.get_string_from_utf8()) + var response = json.get_data() # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). print(response.headers["User-Agent"]) @@ -44,7 +46,7 @@ // Create an HTTP request node and connect its completion signal. var httpRequest = new HTTPRequest(); AddChild(httpRequest); - httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted)); + httpRequest.RequestCompleted += HttpRequestCompleted; // Perform a GET request. The URL below returns JSON as of writing. Error error = httpRequest.Request("https://httpbin.org/get"); @@ -56,21 +58,24 @@ // Perform a POST request. The URL below returns JSON as of writing. // Note: Don't make simultaneous requests using a single HTTPRequest node. // The snippet below is provided for reference only. - string[] body = { "name", "Godette" }; - // GDScript to_json is non existent, so we use JSON.Print() here. - error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, JSON.Print(body)); + string body = new JSON().Stringify(new Godot.Collections.Dictionary + { + { "name", "Godette" } + }); + error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, body); if (error != Error.Ok) { GD.PushError("An error occurred in the HTTP request."); } } - // Called when the HTTP request is completed. private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body) { - // GDScript parse_json is non existent so we have to use JSON.parse, which has a slightly different syntax. - var response = JSON.Parse(body.GetStringFromUTF8()).Result as Godot.Collections.Dictionary; + var json = new JSON(); + json.Parse(body.GetStringFromUTF8()); + var response = json.GetData() as Godot.Collections.Dictionary; + // Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). GD.Print((response["headers"] as Godot.Collections.Dictionary)["User-Agent"]); } @@ -83,7 +88,7 @@ # Create an HTTP request node and connect its completion signal. var http_request = HTTPRequest.new() add_child(http_request) - http_request.connect("request_completed", self, "_http_request_completed") + http_request.request_completed.connect(self._http_request_completed) # Perform the HTTP request. The URL below returns a PNG image as of writing. var error = http_request.request("https://via.placeholder.com/512") @@ -115,7 +120,7 @@ // Create an HTTP request node and connect its completion signal. var httpRequest = new HTTPRequest(); AddChild(httpRequest); - httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted)); + httpRequest.RequestCompleted += HttpRequestCompleted; // Perform the HTTP request. The URL below returns a PNG image as of writing. Error error = httpRequest.Request("https://via.placeholder.com/512"); @@ -125,7 +130,6 @@ } } - // Called when the HTTP request is completed. private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body) { diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 5472ffe4da..43b03ce65e 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -380,17 +380,29 @@ [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project. </description> </method> + <method name="save_exr_to_buffer" qualifiers="const"> + <return type="PackedByteArray" /> + <argument index="0" name="grayscale" type="bool" default="false" /> + <description> + Saves the image as an EXR file to a byte array. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. + [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return an empty byte array when it is called from an exported project. + </description> + </method> <method name="save_jpg" qualifiers="const"> <return type="int" enum="Error" /> <argument index="0" name="path" type="String" /> <argument index="1" name="quality" type="float" default="0.75" /> <description> + Saves the image as a JPEG file to [code]path[/code] with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. + [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. </description> </method> <method name="save_jpg_to_buffer" qualifiers="const"> <return type="PackedByteArray" /> <argument index="0" name="quality" type="float" default="0.75" /> <description> + Saves the image as a JPEG file to a byte array with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. + [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel. </description> </method> <method name="save_png" qualifiers="const"> diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml index 6cc3829b20..9c713bd7ae 100644 --- a/doc/classes/MovieWriter.xml +++ b/doc/classes/MovieWriter.xml @@ -1,8 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="MovieWriter" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + 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 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]. 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. + If you need to encode to a different format or pipe a stream through third-party software, you can extend the [MovieWriter] class to create your own movie writers. This should typically be done using GDExtension for performance reasons. + [b]Editor usage:[/b] A default movie file path can be specified in [member ProjectSettings.editor/movie_writer/movie_file]. Alternatively, for running single scenes, a [code]movie_path[/code] metadata can be added to the root node, specifying the path to a movie file that will be used when recording that scene. Once a path is set, click the video reel icon in the top-right corner of the editor to enable Movie Maker mode, then run any scene as usual. The engine will start recording as soon as the splash screen is finished, and it will only stop recording when the engine quits. Click the video reel icon again to disable Movie Maker mode. Note that toggling Movie Maker mode does not affect project instances that are already running. + [b]Note:[/b] MovieWriter is available for use in both the editor and exported projects, but it is [i]not[/i] designed for use by end users to record videos while playing. Players wishing to record gameplay videos should install tools such as [url=https://obsproject.com/]OBS Studio[/url] or [url=https://www.maartenbaert.be/simplescreenrecorder/]SimpleScreenRecorder[/url] instead. </description> <tutorials> </tutorials> @@ -10,17 +18,26 @@ <method name="_get_audio_mix_rate" qualifiers="virtual const"> <return type="int" /> <description> + Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if [method _get_audio_mix_rate] is not overridden. </description> </method> <method name="_get_audio_speaker_mode" qualifiers="virtual const"> <return type="int" enum="AudioServer.SpeakerMode" /> <description> + Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to [constant AudioServer.SPEAKER_MODE_STEREO] if [method _get_audio_speaker_mode] is not overridden. </description> </method> <method name="_handles_file" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="path" type="String" /> <description> + Called when the engine determines whether this [MovieWriter] is able to handle the file at [code]path[/code]. Must return [code]true[/code] if this [MovieWriter] is able to handle the given file path, [code]false[/code] otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension: + [codeblock] + func _handles_file(path): + # Allows specifying an output file with a `.mkv` file extension (case-insensitive), + # either in the Project Settings or with the `--write-movie <path>` command line argument. + return path.get_extension().to_lower() == "mkv" + [/codeblock] </description> </method> <method name="_write_begin" qualifiers="virtual"> @@ -29,11 +46,14 @@ <argument index="1" name="fps" type="int" /> <argument index="2" name="base_path" type="String" /> <description> + Called once before the engine starts writing video and audio data. [code]movie_size[/code] is the width and height of the video to save. [code]fps[/code] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] command line argument. </description> </method> <method name="_write_end" qualifiers="virtual"> <return type="void" /> <description> + Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when [method SceneTree.quit] is called. + [b]Note:[/b] Pressing [kbd]Ctrl + C[/kbd] on the terminal running the editor/project does [i]not[/i] result in [method _write_end] being called. </description> </method> <method name="_write_frame" qualifiers="virtual"> @@ -41,12 +61,15 @@ <argument index="0" name="frame_image" type="Image" /> <argument index="1" name="audio_frame_block" type="const void*" /> <description> + Called at the end of every rendered frame. The [code]frame_image[/code] and [code]audio_frame_block[/code] function arguments should be written to. </description> </method> <method name="add_writer" qualifiers="static"> <return type="void" /> <argument index="0" name="writer" type="MovieWriter" /> <description> + Adds a writer to be usable by the engine. The supported file extensions can be set by overridding [method _handles_file]. + [b]Note:[/b] [method add_writer] must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. </description> </method> </methods> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 3c18b56658..966f964b12 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -107,6 +107,12 @@ The maximum allowed length for contour edges along the border of the mesh. [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size]. </member> + <member name="filter_baking_aabb" type="AABB" setter="set_filter_baking_aabb" getter="get_filter_baking_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> + If the baking [AABB] has a volume the navigation mesh baking will be restricted to its enclosing area. + </member> + <member name="filter_baking_aabb_offset" type="Vector3" setter="set_filter_baking_aabb_offset" getter="get_filter_baking_aabb_offset" default="Vector3(0, 0, 0)"> + The position offset applied to the [member filter_baking_aabb] [AABB]. + </member> <member name="filter_ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false"> If [code]true[/code], marks spans that are ledges as non-walkable. </member> diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index b92183fda0..612ce54d34 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -8,6 +8,7 @@ The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area. The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes. + [b]Note:[/b] Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh. </description> <tutorials> </tutorials> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 220c12ce7f..36379d2531 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -127,12 +127,28 @@ Destroys the given RID. </description> </method> + <method name="get_maps" qualifiers="const"> + <return type="Array" /> + <description> + Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. + </description> + </method> <method name="map_create" qualifiers="const"> <return type="RID" /> <description> Create a new map. </description> </method> + <method name="map_force_update"> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <description> + This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. + Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame. + [b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. + </description> + </method> <method name="map_get_agents" qualifiers="const"> <return type="Array" /> <argument index="0" name="map" type="RID" /> @@ -276,6 +292,16 @@ Returns the [code]travel_cost[/code] of this [code]region[/code]. </description> </method> + <method name="region_owns_point" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="point" type="Vector2" /> + <description> + Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. + [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. + </description> + </method> <method name="region_set_enter_cost" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index d2eef49cfd..5185b353bc 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -127,12 +127,28 @@ Destroys the given RID. </description> </method> + <method name="get_maps" qualifiers="const"> + <return type="Array" /> + <description> + Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. + </description> + </method> <method name="map_create" qualifiers="const"> <return type="RID" /> <description> Create a new map. </description> </method> + <method name="map_force_update"> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <description> + This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. + Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame. + [b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. + </description> + </method> <method name="map_get_agents" qualifiers="const"> <return type="Array" /> <argument index="0" name="map" type="RID" /> @@ -326,6 +342,16 @@ Returns the [code]travel_cost[/code] of this [code]region[/code]. </description> </method> + <method name="region_owns_point" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="point" type="Vector3" /> + <description> + Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. + [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. + </description> + </method> <method name="region_set_enter_cost" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml index 69d238ceff..656594a3c3 100644 --- a/doc/classes/ORMMaterial3D.xml +++ b/doc/classes/ORMMaterial3D.xml @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Physically based rendering (PBR) material that can be applied to 3D objects, can use an ORM texture. </brief_description> <description> + ORMMaterial3D's properties are inherited from [BaseMaterial3D]. Unlike [StandardMaterial3D], ORMMaterial3D uses a single texture for ambient occlusion, roughness and metallic maps, known as an ORM texture. </description> <tutorials> + <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link> </tutorials> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 3d939a6926..fc86b67c60 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -554,16 +554,31 @@ Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code], if the desired mode is not supported. </member> <member name="editor/movie_writer/disable_vsync" type="bool" setter="" getter="" default="false"> + If [code]true[/code], requests V-Sync to be disabled when writing a movie (similar to setting [member display/window/vsync/vsync_mode] to [b]Disabled[/b]). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate. + [b]Note:[/b] [member editor/movie_writer/disable_vsync] has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it. </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_hz] 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. </member> <member name="editor/movie_writer/mix_rate_hz" 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. </member> <member name="editor/movie_writer/mjpeg_quality" type="float" setter="" getter="" default="0.75"> + The JPEG quality to use when writing a video to an AVI file, between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. + [b]Note:[/b] JPEG does not saving an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. + [b]Note:[/b] This does not affect the audio quality or writing PNG image sequences. </member> <member name="editor/movie_writer/movie_file" type="String" setter="" getter="" default=""""> + The output path for the movie. The file extension determines the [MovieWriter] that will be used. + 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]. 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. + If you need to encode to a different format or pipe a stream through third-party software, you can extend this [MovieWriter] class to create your own movie writers. + When using PNG output, the frame number will be appended at the end of the file name. It starts from 0 and is padded with 8 digits to ensure correct sorting and easier processing. For example, if the output path is [code]/tmp/hello.png[/code], the first two frames will be [code]/tmp/hello00000000.png[/code] and [code]/tmp/hello00000001.png[/code]. The audio will be saved at [code]/tmp/hello.wav[/code]. </member> <member name="editor/movie_writer/speaker_mode" type="int" setter="" getter="" default="0"> + The speaker mode to use in the recorded audio when writing a movie. See [enum AudioServer.SpeakerMode] for possible values. </member> <member name="editor/node_naming/name_casing" type="int" setter="" getter="" default="0"> When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 658793c4c0..1bbf5cb91b 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -5,7 +5,7 @@ </brief_description> <description> A ScrollContainer node meant to contain a [Control] child. - ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.minimum_size] of the Control relative to the ScrollContainer. + ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.custom_minimum_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). </description> <tutorials> diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml index 2305a9d325..bd6e5cdfa2 100644 --- a/doc/classes/StandardMaterial3D.xml +++ b/doc/classes/StandardMaterial3D.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Physically based rendering (PBR) material that can be applied to 3D objects. </brief_description> <description> + StandardMaterial3D's properties are inherited from [BaseMaterial3D]. </description> <tutorials> - <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link> + <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link> </tutorials> </class> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index d78b8db052..513daff37c 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -35,10 +35,11 @@ <method name="start"> <return type="int" enum="Error" /> <argument index="0" name="callable" type="Callable" /> - <argument index="1" name="userdata" type="Variant" default="null" /> - <argument index="2" name="priority" type="int" enum="Thread.Priority" default="1" /> + <argument index="1" name="priority" type="int" enum="Thread.Priority" default="1" /> <description> - Starts a new [Thread] that calls [code]callable[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]callable[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum. + Starts a new [Thread] that calls [code]callable[/code]. + If the method takes some arguments, you can pass them using [method Callable.bind]. + The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum. Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure. </description> </method> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml index 0c2961fd5e..66cf602e5d 100644 --- a/doc/classes/TileData.xml +++ b/doc/classes/TileData.xml @@ -199,7 +199,8 @@ </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false"> </member> - <member name="material" type="ShaderMaterial" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material"> + The [Material] to use for this [TileData]. This can be a [CanvasItemMaterial] to use the default shader, or a [ShaderMaterial] to use a custom shader. </member> <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> </member> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 5ce870a899..f4eaaac2e1 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -4,7 +4,8 @@ Base class for all windows. </brief_description> <description> - A node that creates a window. + A node that creates a window. The window can either be a native system window or embedded inside another [Window] (see [member Viewport.gui_embed_subwindows]). + At runtime, [Window]s will not close automatically when requested. You need to handle it manually using [signal close_requested] (this applies both to clicking close button and clicking outside popup). </description> <tutorials> </tutorials> @@ -18,12 +19,13 @@ <method name="child_controls_changed"> <return type="void" /> <description> + Requests an update of the [Window] size to fit underlying [Control] nodes. </description> </method> <method name="get_contents_minimum_size" qualifiers="const"> <return type="Vector2" /> <description> - Returns the combined minimum size from the child [Control] nodes of the window. + Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when children nodes have changed. </description> </method> <method name="get_flag" qualifiers="const"> @@ -50,6 +52,8 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. + See [method Control.get_theme_color] for more details. </description> </method> <method name="get_theme_constant" qualifiers="const"> @@ -57,21 +61,29 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code]. + See [method Control.get_theme_color] for more details. </description> </method> <method name="get_theme_default_base_scale" qualifiers="const"> <return type="float" /> <description> + Returns the default base scale defined in the attached [Theme]. + See [member Theme.default_base_scale] for more details. </description> </method> <method name="get_theme_default_font" qualifiers="const"> <return type="Font" /> <description> + Returns the default [Font] defined in the attached [Theme]. + See [member Theme.default_font] for more details. </description> </method> <method name="get_theme_default_font_size" qualifiers="const"> <return type="int" /> <description> + Returns the default font size defined in the attached [Theme]. + See [member Theme.default_font_size] for more details. </description> </method> <method name="get_theme_font" qualifiers="const"> @@ -80,6 +92,7 @@ <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. + See [method Control.get_theme_color] for more details. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -88,6 +101,7 @@ <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. + See [method Control.get_theme_color] for more details. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -95,6 +109,8 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns the icon at [code]name[/code] if the theme has [code]theme_type[/code]. + See [method Control.get_theme_color] for more details. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> @@ -102,6 +118,8 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. + See [method Control.get_theme_color] for more details. </description> </method> <method name="grab_focus"> @@ -121,6 +139,7 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code]. </description> </method> <method name="has_theme_constant" qualifiers="const"> @@ -128,6 +147,7 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code]. </description> </method> <method name="has_theme_font" qualifiers="const"> @@ -136,7 +156,6 @@ <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. - Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> @@ -145,7 +164,6 @@ <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. - Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_icon" qualifiers="const"> @@ -153,6 +171,7 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns [code]true[/code] if icon with [code]name[/code] is in [code]theme_type[/code]. </description> </method> <method name="has_theme_stylebox" qualifiers="const"> @@ -160,11 +179,13 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="theme_type" type="StringName" default="""" /> <description> + Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code]. </description> </method> <method name="hide"> <return type="void" /> <description> + Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with [method show]. </description> </method> <method name="is_embedded" qualifiers="const"> @@ -182,28 +203,35 @@ <method name="is_maximize_allowed" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if the window can be maximized (the maximize button is enabled). </description> </method> <method name="is_using_font_oversampling" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if font oversampling is enabled. See [method set_use_font_oversampling]. </description> </method> <method name="move_to_foreground"> <return type="void" /> <description> + Moves the [Window] on top of other windows and focuses it. </description> </method> <method name="popup"> <return type="void" /> <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" /> <description> + Shows the [Window] and makes it transient (see [member transient]). If [code]rect[/code] is provided, it will be set as the [Window]'s size. + Fails if called on the main window. </description> </method> <method name="popup_centered"> <return type="void" /> <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" /> <description> + Popups the [Window] at the center of the current screen, with optionally given minimum size. + If the [Window] is embedded, it will be centered in the parent [Viewport] instead. </description> </method> <method name="popup_centered_clamped"> @@ -211,23 +239,29 @@ <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" /> <argument index="1" name="fallback_ratio" type="float" default="0.75" /> <description> + Popups the [Window] centered inside its parent [Window]. + [code]fallback_ratio[/code] determines the maximum size of the [Window], in relation to its parent. </description> </method> <method name="popup_centered_ratio"> <return type="void" /> <argument index="0" name="ratio" type="float" default="0.8" /> <description> + Popups the [Window] centered inside its parent [Window] and sets its size as a [code]ratio[/code] of parent's size. </description> </method> <method name="popup_on_parent"> <return type="void" /> <argument index="0" name="parent_rect" type="Rect2i" /> <description> + Popups the [Window] with a position shifted by parent [Window]'s position. + If the [Window] is embedded, has the same effect as [method popup]. </description> </method> <method name="request_attention"> <return type="void" /> <description> + Tells the OS that the [Window] needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar. </description> </method> <method name="reset_size"> @@ -248,12 +282,14 @@ <return type="void" /> <argument index="0" name="active" type="bool" /> <description> + If [code]active[/code] is [code]true[/code], enables system's native IME (Input Method Editor). </description> </method> <method name="set_ime_position"> <return type="void" /> <argument index="0" name="position" type="Vector2i" /> <description> + Moves IME to the given position. </description> </method> <method name="set_layout_direction"> @@ -267,17 +303,19 @@ <return type="void" /> <argument index="0" name="enable" type="bool" /> <description> + Enables font oversampling. This makes fonts look better when they are scaled up. </description> </method> <method name="show"> <return type="void" /> <description> + Makes the [Window] appear. This enables interactions with the [Window] and doesn't change any of its property other than visibility (unlike e.g. [method popup]). </description> </method> </methods> <members> <member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the window will be on top of all other windows. + If [code]true[/code], the window will be on top of all other windows. Does not work if [member transient] is enabled. </member> <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true"> Toggles if any text should automatically change to its translated version depending on the current locale. @@ -286,27 +324,36 @@ If [code]true[/code], the window will have no borders. </member> <member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0"> + Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size]. </member> <member name="content_scale_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.0"> + Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size]. </member> <member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0"> + Specifies how the content is scaled when the [Window] is resized. </member> <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)"> + Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, [Window]'s content will be scaled when the window is resized to a different size. </member> <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> The screen the window is currently on. </member> <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> + If [code]true[/code], the [Window] will be in exclusive mode. Exclusive windows are always on top of their parent and will block all input going to the parent [Window]. + Needs [member transient] enabled to work. </member> <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)"> + If non-zero, the [Window] can't be resized to be bigger than this size. </member> <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)"> + If non-zero, the [Window] can't be resized to be smaller than this size. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0"> Set's the window's current mode. [b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux. </member> <member name="popup_window" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled). </member> <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)"> The window's position in pixels. @@ -315,34 +362,46 @@ The window's size in pixels. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> + The [Theme] resource that determines the style of the underlying [Control] nodes. + [Window] styles will have no effect unless the window is embedded. </member> <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&"""> + The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details. </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> - The window's title. + The window's title. If the [Window] is non-embedded, title styles set in [Theme] will have no effect. </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false"> + If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient windows can't be in fullscreen mode and will return focus to their parent when closed. + Note that behavior might be different depending on the platform. </member> <member name="transparent" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows. Currently non-embedded [Window] transparency is implemented only for MacOS. </member> <member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the [Window] can't be focused nor interacted with. It can still be visible. </member> <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the window can't be resized. + If [code]true[/code], the window can't be resized. Minimize and maximize buttons are disabled. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> If [code]true[/code], the window is visible. </member> <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false"> + If [code]true[/code], the window's size will automatically update when a child node is added or removed. + If [code]false[/code], you need to call [method child_controls_changed] manually. </member> </members> <signals> <signal name="about_to_popup"> <description> + Emitted right after [method popup] call, before the [Window] appears or does anything. </description> </signal> <signal name="close_requested"> <description> + Emitted when the [Window]'s close button is pressed or when [member popup_window] is enabled and user clicks outside the window. + This signal can be used to handle window closing, e.g. by connecting it to [method hide]. </description> </signal> <signal name="files_dropped"> @@ -362,49 +421,58 @@ </signal> <signal name="focus_entered"> <description> + Emitted when the [Window] gains focus. </description> </signal> <signal name="focus_exited"> <description> + Emitted when the [Window] loses its focus. </description> </signal> <signal name="go_back_requested"> <description> + Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after [constant Node.NOTIFICATION_WM_GO_BACK_REQUEST]. </description> </signal> <signal name="mouse_entered"> <description> + Emitted when the mouse cursor enters the [Window]'s area, regardless if it's currently focused or not. </description> </signal> <signal name="mouse_exited"> <description> + Emitted when the mouse cursor exits the [Window]'s area (including when it's hovered over another window on top of this one). </description> </signal> <signal name="theme_changed"> <description> + Emitted when the [member theme] is modified or changed to another [Theme]. </description> </signal> <signal name="visibility_changed"> <description> + Emitted when [Window] is made visible or disappears. </description> </signal> <signal name="window_input"> <argument index="0" name="event" type="InputEvent" /> <description> + Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument. </description> </signal> </signals> <constants> <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30"> + Emitted when [Window]'s visibility changes, right before [signal visibility_changed]. </constant> <constant name="MODE_WINDOWED" value="0" enum="Mode"> - Windowed mode. + Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen). </constant> <constant name="MODE_MINIMIZED" value="1" enum="Mode"> - Minimized window mode. + Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is presesd. </constant> <constant name="MODE_MAXIMIZED" value="2" enum="Mode"> - Maximized window mode. + 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 presesd. </constant> <constant name="MODE_FULLSCREEN" value="3" enum="Mode"> Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project. @@ -416,37 +484,49 @@ Regardless of the platform, enabling fullscreen 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 fullscreen mode. </constant> <constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags"> - The window's ability to be resized. + The window's ability to be resized. Set with [member unresizable]. </constant> <constant name="FLAG_BORDERLESS" value="1" enum="Flags"> - Borderless window. + Borderless window. Set with [member borderless]. </constant> <constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags"> - Flag for making the window always on top of all other windows. + Flag for making the window always on top of all other windows. Set with [member always_on_top]. </constant> <constant name="FLAG_TRANSPARENT" value="3" enum="Flags"> + Flag for per-pixel transparency. Set with [member transparent]. </constant> <constant name="FLAG_NO_FOCUS" value="4" enum="Flags"> + The window's ability to gain focus. Set with [member unfocusable]. </constant> <constant name="FLAG_POPUP" value="5" enum="Flags"> + Whether the window is popup or a regular window. Set with [member popup_window]. </constant> <constant name="FLAG_MAX" value="6" enum="Flags"> + Max value of the [enum Flags]. </constant> <constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode"> + The content will not be scaled to match the [Window]'s size. </constant> <constant name="CONTENT_SCALE_MODE_CANVAS_ITEMS" value="1" enum="ContentScaleMode"> + The content will be rendered at the target size. This is more performance-expensive than [constant CONTENT_SCALE_MODE_VIEWPORT], but provides better results. </constant> <constant name="CONTENT_SCALE_MODE_VIEWPORT" value="2" enum="ContentScaleMode"> + The content will be rendered at the base size and then scaled to the target size. More performant than [constant CONTENT_SCALE_MODE_CANVAS_ITEMS], but results in pixelated image. </constant> <constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect"> + The aspect will be ignored. Scaling will simply stretch the content to fit the target size. </constant> <constant name="CONTENT_SCALE_ASPECT_KEEP" value="1" enum="ContentScaleAspect"> + The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides. </constant> <constant name="CONTENT_SCALE_ASPECT_KEEP_WIDTH" value="2" enum="ContentScaleAspect"> + The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides. </constant> <constant name="CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value="3" enum="ContentScaleAspect"> + The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides. </constant> <constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect"> + The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space. </constant> <constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection"> Automatic layout direction, determined from the parent window layout direction. @@ -463,33 +543,41 @@ </constants> <theme_items> <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)"> + The color of the title's text. </theme_item> <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> - The color of the title outline. + The color of the title's text outline. </theme_item> <theme_item name="close_h_offset" data_type="constant" type="int" default="18"> + Horizontal position offset of the close button. </theme_item> <theme_item name="close_v_offset" data_type="constant" type="int" default="24"> + Vertical position offset of the close button. </theme_item> <theme_item name="resize_margin" data_type="constant" type="int" default="4"> - </theme_item> - <theme_item name="scaleborder_size" data_type="constant" type="int" default="4"> + Defines the outside margin at which the window border can be grabbed with mouse and resized. </theme_item> <theme_item name="title_height" data_type="constant" type="int" default="36"> + Height of the title bar. </theme_item> <theme_item name="title_outline_size" data_type="constant" type="int" default="0"> The size of the title outline. </theme_item> <theme_item name="title_font" data_type="font" type="Font"> + The font used to draw the title. </theme_item> <theme_item name="title_font_size" data_type="font_size" type="int"> The size of the title font. </theme_item> <theme_item name="close" data_type="icon" type="Texture2D"> + The icon for the close button. </theme_item> <theme_item name="close_pressed" data_type="icon" type="Texture2D"> + The icon for the close button when it's being pressed. </theme_item> <theme_item name="embedded_border" data_type="style" type="StyleBox"> + The background style used when the [Window] is embedded. Note that this is drawn only under the window's content, excluding the title. For proper borders and title bar style, you can use [code]expand_margin_*[/code] properties of [StyleBoxFlat]. + [b]Note:[/b] The content background will not be visible unless [member transparent] is enabled. </theme_item> </theme_items> </class> diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index f59f2ff872..ce09361dfa 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -913,9 +913,9 @@ def format_codeblock(code_type, post_text, indent_level, state): # types: str, if to_skip > indent_level: print_error( - "{}.xml: Four spaces should be used for indentation within [" - + code_type - + "].".format(state.current_class), + "{}.xml: Four spaces should be used for indentation within [{}].".format( + state.current_class, code_type + ), state, ) |