diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 8df1a7d1d91..5afb97a6ed6 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -17,9 +17,9 @@ Built-in GDScript constants, functions, and annotations. Description ----------- -A list of GDScript-specific utility functions and annotations accessible from any script. +A list of utility functions and annotations accessible from any script written in GDScript. -For the list of the global functions and constants see :ref:`@GlobalScope`. +For the list of global functions and constants that can be accessed in any scripting language, see :ref:`@GlobalScope`. .. rst-class:: classref-introduction-group @@ -43,7 +43,7 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`char`\ (\ char\: :ref:`int`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`convert`\ (\ what\: :ref:`Variant`, type\: :ref:`int`\ ) | + | :ref:`Variant` | :ref:`convert`\ (\ what\: :ref:`Variant`, type\: :ref:`Variant.Type`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`dict_to_inst`\ (\ dictionary\: :ref:`Dictionary`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -958,7 +958,7 @@ Returns a single character (as a :ref:`String`) of the given Unico .. rst-class:: classref-method -:ref:`Variant` **convert**\ (\ what\: :ref:`Variant`, type\: :ref:`int`\ ) :ref:`🔗` +:ref:`Variant` **convert**\ (\ what\: :ref:`Variant`, type\: :ref:`Variant.Type`\ ) :ref:`🔗` **Deprecated:** Use :ref:`@GlobalScope.type_convert` instead. diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 1684c54105f..75f4bf82b96 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -21,7 +21,7 @@ A list of global scope enumerated constants and built-in functions. This is all Singletons are also documented here, since they can be accessed from anywhere. -For the entries related to GDScript which can be accessed in any script see :ref:`@GDScript`. +For the entries that can only be accessed from scripts written in GDScript, see :ref:`@GDScript`. .. note:: diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index 70457128a5c..ff3384aa790 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -23,7 +23,7 @@ Description Multiple **AtlasTexture** resources can be cropped from the same :ref:`atlas`. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls. -\ **Note:** **AtlasTexture** cannot be used in an :ref:`AnimatedTexture`, and may not tile properly in nodes such as :ref:`TextureRect`, when inside other **AtlasTexture** resources. +\ **Note:** **AtlasTexture** cannot be used in an :ref:`AnimatedTexture`, and will not tile properly in nodes such as :ref:`TextureRect` or :ref:`Sprite2D`. To tile an **AtlasTexture**, modify its :ref:`region` instead. .. rst-class:: classref-reftable-group diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index b3d55990523..11e939b6640 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -69,11 +69,7 @@ enum **FilterDB**: :ref:`🔗` :ref:`FilterDB` **FILTER_6DB** = ``0`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Cutting off at 6dB per octave. .. _class_AudioEffectFilter_constant_FILTER_12DB: @@ -81,11 +77,7 @@ enum **FilterDB**: :ref:`🔗` :ref:`FilterDB` **FILTER_12DB** = ``1`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Cutting off at 12dB per octave. .. _class_AudioEffectFilter_constant_FILTER_18DB: @@ -93,11 +85,7 @@ enum **FilterDB**: :ref:`🔗` :ref:`FilterDB` **FILTER_18DB** = ``2`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Cutting off at 18dB per octave. .. _class_AudioEffectFilter_constant_FILTER_24DB: @@ -105,11 +93,7 @@ enum **FilterDB**: :ref:`🔗` :ref:`FilterDB` **FILTER_24DB** = ``3`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Cutting off at 24dB per octave. .. rst-class:: classref-section-separator @@ -148,9 +132,7 @@ Threshold frequency for the filter, in Hz. - |void| **set_db**\ (\ value\: :ref:`FilterDB`\ ) - :ref:`FilterDB` **get_db**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Steepness of the cutoff curve in dB per octave, also known as the order of the filter. Higher orders have a more aggressive cutoff. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index ed98852e81e..2b4b2015ef0 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -64,7 +64,7 @@ Property Descriptions - |void| **set_pan_pullout**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_pan_pullout**\ (\ ) -Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. +Amplifies the difference between stereo channels, increasing or decreasing existing panning. A value of 0.0 will downmix stereo to mono. Does not affect a mono signal. .. rst-class:: classref-item-separator @@ -81,9 +81,7 @@ Values greater than 1.0 increase intensity of any panning on audio passing throu - |void| **set_surround**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_surround**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Widens sound stage through phase shifting in conjunction with :ref:`time_pullout_ms`. Just pans sound to the left channel if :ref:`time_pullout_ms` is 0. .. rst-class:: classref-item-separator @@ -100,9 +98,7 @@ Values greater than 1.0 increase intensity of any panning on audio passing throu - |void| **set_time_pullout**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_time_pullout**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Widens sound stage through phase shifting in conjunction with :ref:`surround`. Just delays the right channel if :ref:`surround` is 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 5a10f28eec9..35cd056cd96 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -87,6 +87,8 @@ Methods +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_bus_volume_db`\ (\ bus_idx\: :ref:`int`\ ) |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_driver_name`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_input_device_list`\ (\ ) | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_mix_rate`\ (\ ) |const| | @@ -514,6 +516,18 @@ Returns the volume of the bus at index ``bus_idx`` in dB. ---- +.. _class_AudioServer_method_get_driver_name: + +.. rst-class:: classref-method + +:ref:`String` **get_driver_name**\ (\ ) |const| :ref:`🔗` + +Returns the name of the current audio driver. The default usually depends on the operating system, but may be overridden via the ``--audio-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. ``--headless`` also automatically sets the audio driver to ``Dummy``. See also :ref:`ProjectSettings.audio/driver/driver`. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioServer_method_get_input_device_list: .. rst-class:: classref-method diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 76f12f3987b..57a1105990f 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -59,10 +59,24 @@ Methods +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_loop_count`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AudioSamplePlayback` | :ref:`get_sample_playback`\ (\ ) |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`mix_audio`\ (\ rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ time\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_sample_playback`\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start`\ (\ from_pos\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -195,6 +209,30 @@ Overridable method. Called whenever the audio stream is mixed if the playback is ---- +.. _class_AudioStreamPlayback_method_get_loop_count: + +.. rst-class:: classref-method + +:ref:`int` **get_loop_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of times the stream has looped. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_method_get_playback_position: + +.. rst-class:: classref-method + +:ref:`float` **get_playback_position**\ (\ ) |const| :ref:`🔗` + +Returns the current position in the stream, in seconds. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStreamPlayback_method_get_sample_playback: .. rst-class:: classref-method @@ -209,6 +247,46 @@ Returns the :ref:`AudioSamplePlayback` associated wit ---- +.. _class_AudioStreamPlayback_method_is_playing: + +.. rst-class:: classref-method + +:ref:`bool` **is_playing**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if the stream is playing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_method_mix_audio: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **mix_audio**\ (\ rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) :ref:`🔗` + +Mixes up to ``frames`` of audio from the stream from the current position, at a rate of ``rate_scale``, advancing the stream. + +Returns a :ref:`PackedVector2Array` where each element holds the left and right channel volume levels of each frame. + +\ **Note:** Can return fewer frames than requested, make sure to use the size of the return value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_method_seek: + +.. rst-class:: classref-method + +|void| **seek**\ (\ time\: :ref:`float` = 0.0\ ) :ref:`🔗` + +Seeks the stream at the given ``time``, in seconds. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStreamPlayback_method_set_sample_playback: .. rst-class:: classref-method @@ -219,6 +297,30 @@ Returns the :ref:`AudioSamplePlayback` associated wit Associates :ref:`AudioSamplePlayback` to this **AudioStreamPlayback** for playing back the audio sample of this stream. +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_method_start: + +.. rst-class:: classref-method + +|void| **start**\ (\ from_pos\: :ref:`float` = 0.0\ ) :ref:`🔗` + +Starts the stream from the given ``from_pos``, in seconds. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_method_stop: + +.. rst-class:: classref-method + +|void| **stop**\ (\ ) :ref:`🔗` + +Stops the stream. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 0b3ac0b753a..2e5e4324920 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -23,6 +23,13 @@ Node for back-buffering the currently-displayed screen. The region defined in th \ **Note:** Since this node inherits from :ref:`Node2D` (and not :ref:`Control`), anchors and margins won't apply to child :ref:`Control`-derived nodes. This can be problematic when resizing the window. To avoid this, add :ref:`Control`-derived nodes as *siblings* to the **BackBufferCopy** node instead of adding them as children. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Screen-reading shaders <../tutorials/shaders/screen-reading_shaders>` + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 0ef073efd0c..4ce59f3b7a3 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -191,7 +191,7 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_visible_in_tree`\ (\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`make_canvas_position_local`\ (\ screen_point\: :ref:`Vector2`\ ) |const| | + | :ref:`Vector2` | :ref:`make_canvas_position_local`\ (\ viewport_point\: :ref:`Vector2`\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`InputEvent` | :ref:`make_input_local`\ (\ event\: :ref:`InputEvent`\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1486,9 +1486,15 @@ Visibility is checked only in parent nodes that inherit from **CanvasItem**, :re .. rst-class:: classref-method -:ref:`Vector2` **make_canvas_position_local**\ (\ screen_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` +:ref:`Vector2` **make_canvas_position_local**\ (\ viewport_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` -Assigns ``screen_point`` as this node's new local transform. +Transforms ``viewport_point`` from the viewport's coordinates to this node's local coordinates. + +For the opposite operation, use :ref:`get_global_transform_with_canvas`. + +:: + + var viewport_point = get_global_transform_with_canvas() * local_point .. rst-class:: classref-item-separator diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index a90a5687fcf..42a739cb129 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -24,6 +24,13 @@ Description **CanvasModulate** applies a color tint to all nodes on a canvas. Only one can be used to tint a canvas, but :ref:`CanvasLayer`\ s can be used to render things independently. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>` + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_control.rst b/classes/class_control.rst index 2025bb1c014..4011a8e5769 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -996,11 +996,11 @@ enum **LayoutDirection**: :ref:`🔗` Automatic layout direction, determined from the parent control layout direction. -.. _class_Control_constant_LAYOUT_DIRECTION_LOCALE: +.. _class_Control_constant_LAYOUT_DIRECTION_APPLICATION_LOCALE: .. rst-class:: classref-enumeration-constant -:ref:`LayoutDirection` **LAYOUT_DIRECTION_LOCALE** = ``1`` +:ref:`LayoutDirection` **LAYOUT_DIRECTION_APPLICATION_LOCALE** = ``1`` Automatic layout direction, determined from the current locale. @@ -1020,6 +1020,32 @@ Left-to-right layout direction. Right-to-left layout direction. +.. _class_Control_constant_LAYOUT_DIRECTION_SYSTEM_LOCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4`` + +Automatic layout direction, determined from the system locale. + +.. _class_Control_constant_LAYOUT_DIRECTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_MAX** = ``5`` + +Represents the size of the :ref:`LayoutDirection` enum. + +.. _class_Control_constant_LAYOUT_DIRECTION_LOCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_LOCALE** = ``1`` + +**Deprecated:** Use :ref:`LAYOUT_DIRECTION_APPLICATION_LOCALE` instead. + + + .. rst-class:: classref-item-separator ---- @@ -2011,7 +2037,7 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra public override bool _CanDropData(Vector2 atPosition, Variant data) { - return data.VariantType == Variant.Type.Dictionary && dict.AsGodotDictionary().ContainsKey("color"); + return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("color"); } public override void _DropData(Vector2 atPosition, Variant data) diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index a07fb68fb15..6e1ed97a915 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -1062,6 +1062,8 @@ Full screen mode with full multi-window support. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. +\ **On Android:** This enables immersive mode. + \ **On Windows:** Multi-window full-screen mode has a 1px border of the :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color` color. \ **On macOS:** A new desktop is used to display the running project. @@ -1078,6 +1080,8 @@ A single window full screen mode. This mode has less overhead, but only one wind Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. +\ **On Android:** This enables immersive mode. + \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. \ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. @@ -1170,11 +1174,21 @@ Use :ref:`window_get_safe_title_margins` **WINDOW_FLAG_SHARP_CORNERS** = ``8`` + +Window style is overridden, forcing sharp corners. + +\ **Note:** This flag is implemented only on Windows (11). + .. _class_DisplayServer_constant_WINDOW_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``8`` +:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``9`` Max value of the :ref:`WindowFlags`. @@ -1322,6 +1336,8 @@ Display handle: - Linux (X11): ``X11::Display*`` for the display. +- Linux (Wayland): ``wl_display`` for the display. + - Android: ``EGLDisplay`` for the display. .. _class_DisplayServer_constant_WINDOW_HANDLE: @@ -1336,6 +1352,8 @@ Window handle: - Linux (X11): ``X11::Window*`` for the window. +- Linux (Wayland): ``wl_surface`` for the window. + - macOS: ``NSWindow*`` for the window. - iOS: ``UIViewController*`` for the view controller. @@ -1368,10 +1386,36 @@ OpenGL context (only with the GL Compatibility renderer): - Linux (X11): ``GLXContext*`` for the window. +- Linux (Wayland): ``EGLContext`` for the window. + - macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). - Android: ``EGLContext`` for the window. +.. _class_DisplayServer_constant_EGL_DISPLAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **EGL_DISPLAY** = ``4`` + +- Windows: ``EGLDisplay`` for the window (ANGLE). + +- macOS: ``EGLDisplay`` for the window (ANGLE). + +- Linux (Wayland): ``EGLDisplay`` for the window. + +.. _class_DisplayServer_constant_EGL_CONFIG: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **EGL_CONFIG** = ``5`` + +- Windows: ``EGLConfig`` for the window (ANGLE). + +- macOS: ``EGLConfig`` for the window (ANGLE). + +- Linux (Wayland): ``EGLConfig`` for the window. + .. rst-class:: classref-item-separator ---- @@ -4273,6 +4317,8 @@ Sets the minimum size for the given window to ``min_size`` in pixels. Normally, Sets window mode for the given window to ``mode``. See :ref:`WindowMode` for possible values and how each mode behaves. +\ **Note:** On Android, setting it to :ref:`WINDOW_MODE_FULLSCREEN` or :ref:`WINDOW_MODE_EXCLUSIVE_FULLSCREEN` will enable immersive mode. + \ **Note:** Setting the window to full screen forcibly sets the borderless flag to ``true``, so make sure to set it back to ``false`` when not wanted. .. rst-class:: classref-item-separator diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index bc1ad69f0f2..366b187a465 100644 --- a/classes/class_editordebuggerplugin.rst +++ b/classes/class_editordebuggerplugin.rst @@ -37,18 +37,20 @@ You can retrieve the available :ref:`EditorDebuggerSession` singleton: + + +.. tabs:: + + .. code-tab:: gdscript + + extends Node + + func _ready(): + EngineDebugger.register_message_capture("my_plugin", _capture) + EngineDebugger.send_message("my_plugin:ping", ["test"]) + + func _capture(message, data): + # Note that the "my_plugin:" prefix is not used here. + if message == "echo": + prints("Echo received:", data) + return true + return false + + + +\ **Note:** While the game is running, :ref:`@GlobalScope.print` and similar functions *called in the editor* do not print anything, the Output Log prints only game messages. + .. rst-class:: classref-reftable-group Methods @@ -131,7 +157,7 @@ Override this method to be notified when all breakpoints are cleared in the edit :ref:`bool` **_capture**\ (\ message\: :ref:`String`, data\: :ref:`Array`, session_id\: :ref:`int`\ ) |virtual| :ref:`🔗` -Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the message (which you can retrieve via :ref:`get_session`). +Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the ``message``. Use :ref:`get_session` to retrieve the session. This method should return ``true`` if the message is recognized. .. rst-class:: classref-item-separator @@ -167,7 +193,7 @@ Override this method to enable receiving messages from the debugger. If ``captur |void| **_setup_session**\ (\ session_id\: :ref:`int`\ ) |virtual| :ref:`🔗` -Override this method to be notified whenever a new :ref:`EditorDebuggerSession` is created (the session may be inactive during this stage). +Override this method to be notified whenever a new :ref:`EditorDebuggerSession` is created. Note that the session may be inactive during this stage. .. rst-class:: classref-item-separator diff --git a/classes/class_editordebuggersession.rst b/classes/class_editordebuggersession.rst index 96922731b1a..a47714ed4c3 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -117,7 +117,7 @@ Method Descriptions |void| **add_session_tab**\ (\ control\: :ref:`Control`\ ) :ref:`🔗` -Adds the given ``control`` to the debug session UI in the debugger bottom panel. +Adds the given ``control`` to the debug session UI in the debugger bottom panel. The ``control``'s node name will be used as the tab title. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index 1f8c924f351..e9cab625a81 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -2700,7 +2700,7 @@ Allows an application to write to the user dictionary. :ref:`bool` **screen/immersive_mode** :ref:`🔗` -If ``true``, hides navigation and status bar. +If ``true``, hides navigation and status bar. See :ref:`DisplayServer.window_set_mode` to toggle it at runtime. .. rst-class:: classref-item-separator diff --git a/classes/class_enginedebugger.rst b/classes/class_enginedebugger.rst index 4f038223c31..18fc947dfa6 100644 --- a/classes/class_enginedebugger.rst +++ b/classes/class_enginedebugger.rst @@ -266,7 +266,9 @@ Calls the ``toggle`` callable of the profiler with given ``name`` and ``argument Registers a message capture with given ``name``. If ``name`` is "my_message" then messages starting with "my_message:" will be called with the given callable. -Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return ``true`` otherwise ``false``. +The callable must accept a message string and a data array as argument. The callable should return ``true`` if the message is recognized. + +\ **Note:** The callable will receive the message with the prefix stripped, unlike :ref:`EditorDebuggerPlugin._capture`. See the :ref:`EditorDebuggerPlugin` description for an example. .. rst-class:: classref-item-separator diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 023e8858327..73d5dc7d898 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -29,6 +29,8 @@ Methods .. table:: :widths: auto + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`bresenham_line`\ (\ from\: :ref:`Vector2i`, to\: :ref:`Vector2i`\ ) | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`clip_polygons`\ (\ polygon_a\: :ref:`PackedVector2Array`, polygon_b\: :ref:`PackedVector2Array`\ ) | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -217,6 +219,26 @@ Endpoints are rounded off and extended by ``delta`` units. Method Descriptions ------------------- +.. _class_Geometry2D_method_bresenham_line: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Vector2i`\] **bresenham_line**\ (\ from\: :ref:`Vector2i`, to\: :ref:`Vector2i`\ ) :ref:`🔗` + +Returns the `Bresenham line `__ between the ``from`` and ``to`` points. A Bresenham line is a series of pixels that draws a line and is always 1-pixel thick on every row and column of the drawing (never more, never less). + +Example code to draw a line between two :ref:`Marker2D` nodes using a series of :ref:`CanvasItem.draw_rect` calls: + +:: + + func _draw(): + for pixel in Geometry2D.bresenham_line($MarkerA.position, $MarkerB.position): + draw_rect(Rect2(pixel, Vector2.ONE), Color.WHITE) + +.. rst-class:: classref-item-separator + +---- + .. _class_Geometry2D_method_clip_polygons: .. rst-class:: classref-method diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index 26947c36b42..aa1130387ef 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -290,11 +290,7 @@ Request successful. :ref:`Result` **RESULT_CHUNKED_BODY_SIZE_MISMATCH** = ``1`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Request failed due to a mismatch between the expected and actual chunked body size during transfer. Possible causes include network errors, server misconfiguration, or issues with chunked encoding. .. _class_HTTPRequest_constant_RESULT_CANT_CONNECT: @@ -350,11 +346,7 @@ Request exceeded its maximum size limit, see :ref:`body_size_limit` **RESULT_BODY_DECOMPRESS_FAILED** = ``8`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Request failed due to an error while decompressing the response body. Possible causes include unsupported or incorrect compression format, corrupted data, or incomplete transfer. .. _class_HTTPRequest_constant_RESULT_REQUEST_FAILED: diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index f96c1679e06..28b5c5aaec7 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -21,7 +21,7 @@ Description Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See :ref:`Node._input`. -\ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing `Bresenham's line algorithm `__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. +\ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider using :ref:`Geometry2D.bresenham_line` as well to avoid visible gaps in lines if the user is moving the mouse quickly. \ **Note:** This event may be emitted even when the mouse hasn't moved, either by the operating system or by Godot itself. If you really need to know if the mouse has moved (e.g. to suppress displaying a tooltip), you should check that ``relative.is_zero_approx()`` is ``false``. diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index 01e15d35d7b..8b0dd5f89b3 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -85,6 +85,8 @@ Properties +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`shadow_blur` | ``1.0`` | +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_caster_mask` | ``4294967295`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`shadow_enabled` | ``false`` | +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`shadow_normal_bias` | ``2.0`` | @@ -741,6 +743,23 @@ Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolu ---- +.. _class_Light3D_property_shadow_caster_mask: + +.. rst-class:: classref-property + +:ref:`int` **shadow_caster_mask** = ``4294967295`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_shadow_caster_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_shadow_caster_mask**\ (\ ) + +The light will only cast shadows using objects in the selected layers. + +.. rst-class:: classref-item-separator + +---- + .. _class_Light3D_property_shadow_enabled: .. rst-class:: classref-property diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 04d45d011c6..a14c03e116c 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -80,6 +80,8 @@ On macOS, some extra keyboard shortcuts are available: - :kbd:`Cmd + Right Arrow`: Same as :kbd:`End`, move the caret to the end of the line +\ **Note:** Caret movement shortcuts listed above are not affected by :ref:`shortcut_keys_enabled`. + .. rst-class:: classref-reftable-group Properties @@ -1094,7 +1096,7 @@ If ``false``, it's impossible to select the text using mouse nor keyboard. - |void| **set_shortcut_keys_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_shortcut_keys_enabled**\ (\ ) -If ``false``, using shortcuts will be disabled. +If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled. .. rst-class:: classref-item-separator diff --git a/classes/class_material.rst b/classes/class_material.rst index 659b2dc8ceb..ec4bec7ce20 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -217,7 +217,7 @@ Creates a placeholder version of this resource (:ref:`PlaceholderMaterial` -Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. +Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also :ref:`Shader.inspect_native_shader_code`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_node.rst b/classes/class_node.rst index 5fba3e48bfd..ac0bc53fd5b 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -1267,7 +1267,7 @@ The node's processing behavior (see :ref:`ProcessMode`). - |void| **set_physics_process_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_physics_process_priority**\ (\ ) -Similar to :ref:`process_priority` but for :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_physics_process` or the internal version. +Similar to :ref:`process_priority` but for :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_physics_process`, or :ref:`NOTIFICATION_INTERNAL_PHYSICS_PROCESS`. .. rst-class:: classref-item-separator @@ -1284,7 +1284,7 @@ Similar to :ref:`process_priority` but for - |void| **set_process_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_process_priority**\ (\ ) -The node's execution order of the process callbacks (:ref:`_process`, :ref:`_physics_process`, and internal processing). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order. +The node's execution order of the process callbacks (:ref:`_process`, :ref:`NOTIFICATION_PROCESS`, and :ref:`NOTIFICATION_INTERNAL_PROCESS`). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order. .. rst-class:: classref-item-separator @@ -1475,6 +1475,8 @@ Called during the physics processing step of the main loop. Physics processing m It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process`. +Processing happens in order of :ref:`process_physics_priority`, lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal). + Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS` notification in :ref:`Object._notification`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1493,6 +1495,8 @@ Called during the processing step of the main loop. Processing happens at every It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process`. +Processing happens in order of :ref:`process_priority`, lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal). + Corresponds to the :ref:`NOTIFICATION_PROCESS` notification in :ref:`Object._notification`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst index 8f0534e8534..85a5b41cd59 100644 --- a/classes/class_openxripbinding.rst +++ b/classes/class_openxripbinding.rst @@ -19,7 +19,7 @@ Defines a binding between an :ref:`OpenXRAction` and an XR i Description ----------- -This binding resource binds an :ref:`OpenXRAction` to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". +This binding resource binds an :ref:`OpenXRAction` to an input or output. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". This would require two binding entries. .. rst-class:: classref-reftable-group @@ -29,11 +29,13 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------+-------------------------+ - | :ref:`OpenXRAction` | :ref:`action` | | - +---------------------------------------------------+------------------------------------------------------+-------------------------+ - | :ref:`PackedStringArray` | :ref:`paths` | ``PackedStringArray()`` | - +---------------------------------------------------+------------------------------------------------------+-------------------------+ + +---------------------------------------------------+------------------------------------------------------------------+--------+ + | :ref:`OpenXRAction` | :ref:`action` | | + +---------------------------------------------------+------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`binding_path` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------+--------+ + | :ref:`PackedStringArray` | :ref:`paths` | | + +---------------------------------------------------+------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -73,7 +75,26 @@ Property Descriptions - |void| **set_action**\ (\ value\: :ref:`OpenXRAction`\ ) - :ref:`OpenXRAction` **get_action**\ (\ ) -:ref:`OpenXRAction` that is bound to these paths. +:ref:`OpenXRAction` that is bound to :ref:`binding_path`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRIPBinding_property_binding_path: + +.. rst-class:: classref-property + +:ref:`String` **binding_path** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_binding_path**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_binding_path**\ (\ ) + +Binding path that defines the input or output bound to :ref:`action`. + +\ **Note:** Binding paths are suggestions, an XR runtime may choose to bind the action to a different input or output emulating this input or output. .. rst-class:: classref-item-separator @@ -83,13 +104,15 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedStringArray` **paths** = ``PackedStringArray()`` :ref:`🔗` +:ref:`PackedStringArray` **paths** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_paths**\ (\ value\: :ref:`PackedStringArray`\ ) - :ref:`PackedStringArray` **get_paths**\ (\ ) +**Deprecated:** Use :ref:`binding_path` instead. + Paths that define the inputs or outputs bound on the device. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. @@ -109,6 +132,8 @@ Method Descriptions |void| **add_path**\ (\ path\: :ref:`String`\ ) :ref:`🔗` +**Deprecated:** Binding is for a single path. + Add an input/output path to this binding. .. rst-class:: classref-item-separator @@ -121,6 +146,8 @@ Add an input/output path to this binding. :ref:`int` **get_path_count**\ (\ ) |const| :ref:`🔗` +**Deprecated:** Binding is for a single path. + Get the number of input/output paths in this binding. .. rst-class:: classref-item-separator @@ -133,6 +160,8 @@ Get the number of input/output paths in this binding. :ref:`bool` **has_path**\ (\ path\: :ref:`String`\ ) |const| :ref:`🔗` +**Deprecated:** Binding is for a single path. + Returns ``true`` if this input/output path is part of this binding. .. rst-class:: classref-item-separator @@ -145,6 +174,8 @@ Returns ``true`` if this input/output path is part of this binding. |void| **remove_path**\ (\ path\: :ref:`String`\ ) :ref:`🔗` +**Deprecated:** Binding is for a single path. + Removes this input/output path from this binding. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index ded3b5d3e1e..2c00ecdad6f 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -32,6 +32,8 @@ When naming a Project Settings property, use the full path to the setting includ Tutorials --------- +- :doc:`Project Settings <../tutorials/editor/project_settings>` + - `3D Physics Tests Demo `__ - `3D Platformer Demo `__ @@ -433,6 +435,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/size/resizable` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/sharp_corners` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/size/transparent` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/size/viewport_height` | ``648`` | @@ -2244,6 +2248,8 @@ Specifies the audio driver to use. This setting is platform-dependent as each pl The ``Dummy`` audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer. +To query the value that is being used at run-time (which may be overridden by command-line arguments or headless mode), use :ref:`AudioServer.get_driver_name`. + \ **Note:** The driver in use can be overridden at runtime via the ``--audio-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. .. rst-class:: classref-item-separator @@ -4184,6 +4190,20 @@ If ``true``, allows the window to be resizable by default. ---- +.. _class_ProjectSettings_property_display/window/size/sharp_corners: + +.. rst-class:: classref-property + +:ref:`bool` **display/window/size/sharp_corners** = ``false`` :ref:`🔗` + +If ``true``, the main window uses sharp corners by default. + +\ **Note:** This property is implemented only on Windows (11). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_display/window/size/transparent: .. rst-class:: classref-property diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 6e5226a106d..f8416884b8c 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -545,6 +545,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`light_set_shadow`\ (\ light\: :ref:`RID`, enabled\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_shadow_caster_mask`\ (\ light\: :ref:`RID`, mask\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`lightmap_create`\ (\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_bsp_tree`\ (\ lightmap\: :ref:`RID`\ ) |const| | @@ -9036,6 +9038,18 @@ If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled ---- +.. _class_RenderingServer_method_light_set_shadow_caster_mask: + +.. rst-class:: classref-method + +|void| **light_set_shadow_caster_mask**\ (\ light\: :ref:`RID`, mask\: :ref:`int`\ ) :ref:`🔗` + +Sets the shadow caster mask for this 3D light. Shadows will only be cast using objects in the selected layers. Equivalent to :ref:`Light3D.shadow_caster_mask`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_lightmap_create: .. rst-class:: classref-method diff --git a/classes/class_resourceimporterobj.rst b/classes/class_resourceimporterobj.rst index cfc2b3127c6..4001f36b9a2 100644 --- a/classes/class_resourceimporterobj.rst +++ b/classes/class_resourceimporterobj.rst @@ -38,15 +38,23 @@ Properties .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`force_disable_mesh_compression` | ``false`` | - +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`generate_tangents` | ``true`` | - +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`offset_mesh` | ``Vector3(0, 0, 0)`` | - +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`scale_mesh` | ``Vector3(1, 1, 1)`` | - +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`force_disable_mesh_compression` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`generate_lightmap_uv2` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`generate_lightmap_uv2_texel_size` | ``0.2`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`generate_lods` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`generate_shadow_mesh` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`generate_tangents` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`offset_mesh` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`scale_mesh` | ``Vector3(1, 1, 1)`` | + +-------------------------------+--------------------------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-section-separator @@ -69,6 +77,56 @@ If ``true``, mesh compression will not be used. Consider enabling if you notice ---- +.. _class_ResourceImporterOBJ_property_generate_lightmap_uv2: + +.. rst-class:: classref-property + +:ref:`bool` **generate_lightmap_uv2** = ``false`` :ref:`🔗` + +If ``true``, generates UV2 on import for :ref:`LightmapGI` baking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterOBJ_property_generate_lightmap_uv2_texel_size: + +.. rst-class:: classref-property + +:ref:`float` **generate_lightmap_uv2_texel_size** = ``0.2`` :ref:`🔗` + +Controls the size of each texel on the baked lightmap. A smaller value results in more precise lightmaps, at the cost of larger lightmap sizes and longer bake times. + +\ **Note:** Only effective if :ref:`generate_lightmap_uv2` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterOBJ_property_generate_lods: + +.. rst-class:: classref-property + +:ref:`bool` **generate_lods** = ``true`` :ref:`🔗` + +If ``true``, generates lower detail variants of the mesh which will be displayed in the distance to improve rendering performance. Not all meshes benefit from LOD, especially if they are never rendered from far away. Disabling this can reduce output file size and speed up importing. See `Mesh level of detail (LOD) <../tutorials/3d/mesh_lod.html#doc-mesh-lod>`__ for more information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterOBJ_property_generate_shadow_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **generate_shadow_mesh** = ``true`` :ref:`🔗` + +If ``true``, enables the generation of shadow meshes on import. This optimizes shadow rendering without reducing quality by welding vertices together when possible. This in turn reduces the memory bandwidth required to render shadows. Shadow mesh generation currently doesn't support using a lower detail level than the source mesh (but shadow rendering will make use of LODs when relevant). + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterOBJ_property_generate_tangents: .. rst-class:: classref-property diff --git a/classes/class_shader.rst b/classes/class_shader.rst index 20d7683c8d3..2201b315fa0 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -59,6 +59,8 @@ Methods +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_shader_uniform_list`\ (\ get_groups\: :ref:`bool` = false\ ) | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`inspect_native_shader_code`\ (\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_default_texture_parameter`\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture`, index\: :ref:`int` = 0\ ) | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -190,6 +192,18 @@ If argument ``get_groups`` is true, parameter grouping hints will be provided. ---- +.. _class_Shader_method_inspect_native_shader_code: + +.. rst-class:: classref-method + +|void| **inspect_native_shader_code**\ (\ ) :ref:`🔗` + +Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also :ref:`Material.inspect_native_shader_code`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Shader_method_set_default_texture_parameter: .. rst-class:: classref-method diff --git a/classes/class_string.rst b/classes/class_string.rst index dd13ac0f7f5..13bb8f86efc 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -21,6 +21,8 @@ This is the built-in string Variant type (and the one used by GDScript). Strings Some string methods have corresponding variations. Variations suffixed with ``n`` (:ref:`countn`, :ref:`findn`, :ref:`replacen`, etc.) are **case-insensitive** (they make no distinction between uppercase and lowercase letters). Method variations prefixed with ``r`` (:ref:`rfind`, :ref:`rsplit`, etc.) are reversed, and start from the end of the string, instead of the beginning. +To convert any Variant to or from a string, see :ref:`@GlobalScope.str`, :ref:`@GlobalScope.str_to_var`, and :ref:`@GlobalScope.var_to_str`. + \ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. .. note:: diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 476b1c5c006..971c1092d2a 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -181,7 +181,7 @@ The identity **Transform2D**. A transform with no translation, no rotation, and - The :ref:`x` points right (:ref:`Vector2.RIGHT`); -- The :ref:`y` points up (:ref:`Vector2.UP`). +- The :ref:`y` points down (:ref:`Vector2.DOWN`). :: @@ -259,7 +259,7 @@ On the identity transform, this vector points right (:ref:`Vector2.RIGHT`, this represents the transform's rotation, scale, and skew. -On the identity transform, this vector points up (:ref:`Vector2.UP`). +On the identity transform, this vector points down (:ref:`Vector2.DOWN`). .. rst-class:: classref-section-separator diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 59e259da06a..9d6596bbc92 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -197,6 +197,10 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hovered_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hovered_dimmed_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | @@ -287,6 +291,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`updown` | | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`button_hover` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`button_pressed` | | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`cursor` | | @@ -301,6 +307,10 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`focus` | | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hovered` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hovered_dimmed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`panel` | | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`selected` | | @@ -1364,6 +1374,30 @@ Text :ref:`Color` for a :ref:`TreeItem.CELL_MODE_CHECK` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` + +Text :ref:`Color` used when the item is hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_color_font_hovered_dimmed_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hovered_dimmed_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗` + +Text :ref:`Color` used when the item is hovered, while a button of the same item is hovered as the same time. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -1906,6 +1940,18 @@ The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE` **button_hover** :ref:`🔗` + +:ref:`StyleBox` used when a button in the tree is hovered. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_style_button_pressed: .. rst-class:: classref-themeproperty @@ -1990,6 +2036,30 @@ The focused style for the **Tree**, drawn on top of everything. ---- +.. _class_Tree_theme_style_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hovered** :ref:`🔗` + +:ref:`StyleBox` for the item being hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_style_hovered_dimmed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hovered_dimmed** :ref:`🔗` + +:ref:`StyleBox` for the item being hovered, while a button of the same item is hovered as the same time. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_style_panel: .. rst-class:: classref-themeproperty diff --git a/classes/class_window.rst b/classes/class_window.rst index 004a0b70cf9..5d6c7f4f4cf 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -76,6 +76,8 @@ Properties +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i` | :ref:`position` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`sharp_corners` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i` | :ref:`size` | ``Vector2i(100, 100)`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Theme` | :ref:`theme` | | @@ -623,11 +625,23 @@ All mouse events are passed to the underlying window of the same application. \ **Note:** This flag has no effect in embedded windows. +.. _class_Window_constant_FLAG_SHARP_CORNERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_SHARP_CORNERS** = ``8`` + +Window style is overridden, forcing sharp corners. + +\ **Note:** This flag has no effect in embedded windows. + +\ **Note:** This flag is implemented only on Windows (11). + .. _class_Window_constant_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Flags` **FLAG_MAX** = ``8`` +:ref:`Flags` **FLAG_MAX** = ``9`` Max value of the :ref:`Flags`. @@ -759,11 +773,11 @@ enum **LayoutDirection**: :ref:`🔗` Automatic layout direction, determined from the parent window layout direction. -.. _class_Window_constant_LAYOUT_DIRECTION_LOCALE: +.. _class_Window_constant_LAYOUT_DIRECTION_APPLICATION_LOCALE: .. rst-class:: classref-enumeration-constant -:ref:`LayoutDirection` **LAYOUT_DIRECTION_LOCALE** = ``1`` +:ref:`LayoutDirection` **LAYOUT_DIRECTION_APPLICATION_LOCALE** = ``1`` Automatic layout direction, determined from the current locale. @@ -783,6 +797,32 @@ Left-to-right layout direction. Right-to-left layout direction. +.. _class_Window_constant_LAYOUT_DIRECTION_SYSTEM_LOCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4`` + +Automatic layout direction, determined from the system locale. + +.. _class_Window_constant_LAYOUT_DIRECTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_MAX** = ``5`` + +Represents the size of the :ref:`LayoutDirection` enum. + +.. _class_Window_constant_LAYOUT_DIRECTION_LOCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_LOCALE** = ``1`` + +**Deprecated:** Use :ref:`LAYOUT_DIRECTION_APPLICATION_LOCALE` instead. + + + .. rst-class:: classref-item-separator ---- @@ -1301,6 +1341,27 @@ If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` **sharp_corners** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enabled\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| + +If ``true``, the **Window** will override the OS window style to display sharp corners. + +\ **Note:** This property is implemented only on Windows (11). + +\ **Note:** This property only works with native windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_size: .. rst-class:: classref-property