diff options
Diffstat (limited to 'doc/classes')
30 files changed, 189 insertions, 32 deletions
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/Image.xml b/doc/classes/Image.xml index 5472ffe4da..d2baf78a9e 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -385,12 +385,16 @@ <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/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/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> |