2
0
Эх сурвалжийг харах

classref: Sync with current master branch (c6d130a)

Godot Organization 2 долоо хоног өмнө
parent
commit
c65aa5f300

+ 13 - 13
classes/class_editorexportplatformweb.rst

@@ -75,11 +75,11 @@ Properties
    +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`int<class_int>`       | :ref:`progressive_web_app/orientation<class_EditorExportPlatformWeb_property_progressive_web_app/orientation>`                                                     |
    +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-   | :ref:`int<class_int>`       | :ref:`variant/emscripten_pool_size<class_EditorExportPlatformWeb_property_variant/emscripten_pool_size>`                                                           |
+   | :ref:`int<class_int>`       | :ref:`threads/emscripten_pool_size<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>`                                                           |
    +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-   | :ref:`bool<class_bool>`     | :ref:`variant/extensions_support<class_EditorExportPlatformWeb_property_variant/extensions_support>`                                                               |
+   | :ref:`int<class_int>`       | :ref:`threads/godot_pool_size<class_EditorExportPlatformWeb_property_threads/godot_pool_size>`                                                                     |
    +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-   | :ref:`int<class_int>`       | :ref:`variant/godot_pool_size<class_EditorExportPlatformWeb_property_variant/godot_pool_size>`                                                                     |
+   | :ref:`bool<class_bool>`     | :ref:`variant/extensions_support<class_EditorExportPlatformWeb_property_variant/extensions_support>`                                                               |
    +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`bool<class_bool>`     | :ref:`variant/thread_support<class_EditorExportPlatformWeb_property_variant/thread_support>`                                                                       |
    +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -335,11 +335,11 @@ The orientation to use when the web application is run through a mobile device.
 
 ----
 
-.. _class_EditorExportPlatformWeb_property_variant/emscripten_pool_size:
+.. _class_EditorExportPlatformWeb_property_threads/emscripten_pool_size:
 
 .. rst-class:: classref-property
 
-:ref:`int<class_int>` **variant/emscripten_pool_size** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/emscripten_pool_size>`
+:ref:`int<class_int>` **threads/emscripten_pool_size** :ref:`🔗<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>`
 
 The number of threads that emscripten will allocate at startup. A smaller value will allocate fewer threads and consume fewer system resources, but you may run the risk of running out of threads in the pool and needing to allocate more threads at run time which may cause a deadlock.
 
@@ -349,27 +349,27 @@ The number of threads that emscripten will allocate at startup. A smaller value
 
 ----
 
-.. _class_EditorExportPlatformWeb_property_variant/extensions_support:
+.. _class_EditorExportPlatformWeb_property_threads/godot_pool_size:
 
 .. rst-class:: classref-property
 
-:ref:`bool<class_bool>` **variant/extensions_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/extensions_support>`
+:ref:`int<class_int>` **threads/godot_pool_size** :ref:`🔗<class_EditorExportPlatformWeb_property_threads/godot_pool_size>`
 
-If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web build.
+Override for the default size of the :ref:`WorkerThreadPool<class_WorkerThreadPool>`. This setting is used when :ref:`ProjectSettings.threading/worker_pool/max_threads<class_ProjectSettings_property_threading/worker_pool/max_threads>` size is set to -1 (which it is by default). This size must be smaller than :ref:`threads/emscripten_pool_size<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>` otherwise deadlocks may occur.
+
+When using threads this size needs to be large enough to accommodate features that rely on having a dedicated thread like :ref:`ProjectSettings.physics/2d/run_on_separate_thread<class_ProjectSettings_property_physics/2d/run_on_separate_thread>` or :ref:`ProjectSettings.rendering/driver/threads/thread_model<class_ProjectSettings_property_rendering/driver/threads/thread_model>`. In general, it is best to ensure that this is at least 4 and is at least 2 or 3 less than :ref:`threads/emscripten_pool_size<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>`.
 
 .. rst-class:: classref-item-separator
 
 ----
 
-.. _class_EditorExportPlatformWeb_property_variant/godot_pool_size:
+.. _class_EditorExportPlatformWeb_property_variant/extensions_support:
 
 .. rst-class:: classref-property
 
-:ref:`int<class_int>` **variant/godot_pool_size** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/godot_pool_size>`
-
-Override for the default size of the :ref:`WorkerThreadPool<class_WorkerThreadPool>`. This setting is used when :ref:`ProjectSettings.threading/worker_pool/max_threads<class_ProjectSettings_property_threading/worker_pool/max_threads>` size is set to -1 (which it is by default). This size must be smaller than :ref:`variant/emscripten_pool_size<class_EditorExportPlatformWeb_property_variant/emscripten_pool_size>` otherwise deadlocks may occur.
+:ref:`bool<class_bool>` **variant/extensions_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/extensions_support>`
 
-When using threads this size needs to be large enough to accommodate features that rely on having a dedicated thread like :ref:`ProjectSettings.physics/2d/run_on_separate_thread<class_ProjectSettings_property_physics/2d/run_on_separate_thread>` or :ref:`ProjectSettings.rendering/driver/threads/thread_model<class_ProjectSettings_property_rendering/driver/threads/thread_model>`. In general, it is best to ensure that this is at least 4 and is at least 2 or 3 less than :ref:`variant/emscripten_pool_size<class_EditorExportPlatformWeb_property_variant/emscripten_pool_size>`.
+If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web build.
 
 .. rst-class:: classref-item-separator
 

+ 2 - 2
classes/class_httprequest.rst

@@ -119,7 +119,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content
         http_request.request_completed.connect(self._http_request_completed)
 
         # Perform the HTTP request. The URL below returns a PNG image as of writing.
-        var error = http_request.request("https://placehold.co/512")
+        var error = http_request.request("https://placehold.co/512.png")
         if error != OK:
             push_error("An error occurred in the HTTP request.")
 
@@ -150,7 +150,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content
         httpRequest.RequestCompleted += HttpRequestCompleted;
 
         // Perform the HTTP request. The URL below returns a PNG image as of writing.
-        Error error = httpRequest.Request("https://placehold.co/512");
+        Error error = httpRequest.Request("https://placehold.co/512.png");
         if (error != Error.Ok)
         {
             GD.PushError("An error occurred in the HTTP request.");

+ 8 - 0
classes/class_renderingdevice.rst

@@ -4460,6 +4460,14 @@ Support for MetalFX temporal upscaling.
 
 Features support for buffer device address extension.
 
+.. _class_RenderingDevice_constant_SUPPORTS_IMAGE_ATOMIC_32_BIT:
+
+.. rst-class:: classref-enumeration-constant
+
+:ref:`Features<enum_RenderingDevice_Features>` **SUPPORTS_IMAGE_ATOMIC_32_BIT** = ``7``
+
+Support for 32-bit image atomic operations.
+
 .. rst-class:: classref-item-separator
 
 ----

+ 74 - 0
classes/class_richtextlabel.rst

@@ -87,6 +87,8 @@ Properties
    +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
    | :ref:`bool<class_bool>`                                                     | :ref:`scroll_following<class_RichTextLabel_property_scroll_following>`                                           | ``false``                                                                 |
    +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
+   | :ref:`bool<class_bool>`                                                     | :ref:`scroll_following_visible_characters<class_RichTextLabel_property_scroll_following_visible_characters>`     | ``false``                                                                 |
+   +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
    | :ref:`bool<class_bool>`                                                     | :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>`                                         | ``false``                                                                 |
    +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
    | :ref:`bool<class_bool>`                                                     | :ref:`shortcut_keys_enabled<class_RichTextLabel_property_shortcut_keys_enabled>`                                 | ``true``                                                                  |
@@ -173,6 +175,8 @@ Methods
    +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_RichTextLabel_method_get_v_scroll_bar>`\ (\ )                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
    +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+   | :ref:`Rect2i<class_Rect2i>`         | :ref:`get_visible_content_rect<class_RichTextLabel_method_get_visible_content_rect>`\ (\ ) |const|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+   +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`int<class_int>`               | :ref:`get_visible_line_count<class_RichTextLabel_method_get_visible_line_count>`\ (\ ) |const|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
    +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`int<class_int>`               | :ref:`get_visible_paragraph_count<class_RichTextLabel_method_get_visible_paragraph_count>`\ (\ ) |const|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
@@ -900,6 +904,23 @@ If ``true``, the window scrolls down to display new content automatically.
 
 ----
 
+.. _class_RichTextLabel_property_scroll_following_visible_characters:
+
+.. rst-class:: classref-property
+
+:ref:`bool<class_bool>` **scroll_following_visible_characters** = ``false`` :ref:`🔗<class_RichTextLabel_property_scroll_following_visible_characters>`
+
+.. rst-class:: classref-property-setget
+
+- |void| **set_scroll_follow_visible_characters**\ (\ value\: :ref:`bool<class_bool>`\ )
+- :ref:`bool<class_bool>` **is_scroll_following_visible_characters**\ (\ )
+
+If ``true``, the window scrolls to display the last visible line when :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` or :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` is changed.
+
+.. rst-class:: classref-item-separator
+
+----
+
 .. _class_RichTextLabel_property_selection_enabled:
 
 .. rst-class:: classref-property
@@ -1264,6 +1285,8 @@ Returns the paragraph number of the character position provided. Paragraph and c
 
 Returns the height of the content.
 
+\ **Note:** This method always returns the full content size, and is not affected by :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` and :ref:`visible_characters<class_RichTextLabel_property_visible_characters>`. To get the visible content size, use :ref:`get_visible_content_rect()<class_RichTextLabel_method_get_visible_content_rect>`.
+
 \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
 
 .. rst-class:: classref-item-separator
@@ -1278,6 +1301,8 @@ Returns the height of the content.
 
 Returns the width of the content.
 
+\ **Note:** This method always returns the full content size, and is not affected by :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` and :ref:`visible_characters<class_RichTextLabel_property_visible_characters>`. To get the visible content size, use :ref:`get_visible_content_rect()<class_RichTextLabel_method_get_visible_content_rect>`.
+
 \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
 
 .. rst-class:: classref-item-separator
@@ -1523,6 +1548,51 @@ Returns the vertical scrollbar.
 
 \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
 
+.. rst-class:: classref-item-separator
+
+----
+
+.. _class_RichTextLabel_method_get_visible_content_rect:
+
+.. rst-class:: classref-method
+
+:ref:`Rect2i<class_Rect2i>` **get_visible_content_rect**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_visible_content_rect>`
+
+Returns the bounding rectangle of the visible content.
+
+\ **Note:** This method returns a correct value only after the label has been drawn.
+
+
+.. tabs::
+
+ .. code-tab:: gdscript
+
+    extends RichTextLabel
+
+    @export var background_panel: Panel
+
+    func _ready():
+        await draw
+        background_panel.position = get_visible_content_rect().position
+        background_panel.size = get_visible_content_rect().size
+
+ .. code-tab:: csharp
+
+    public partial class TestLabel : RichTextLabel
+    {
+        [Export]
+        public Panel BackgroundPanel { get; set; }
+
+        public override async void _Ready()
+        {
+            await ToSignal(this, Control.SignalName.Draw);
+            BackgroundGPanel.Position = GetVisibleContentRect().Position;
+            BackgroundPanel.Size = GetVisibleContentRect().Size;
+        }
+    }
+
+
+
 .. rst-class:: classref-item-separator
 
 ----
@@ -1535,6 +1605,8 @@ Returns the vertical scrollbar.
 
 Returns the number of visible lines.
 
+\ **Note:** This method returns a correct value only after the label has been drawn.
+
 \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
 
 .. rst-class:: classref-item-separator
@@ -1549,6 +1621,8 @@ Returns the number of visible lines.
 
 Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
 
+\ **Note:** This method returns a correct value only after the label has been drawn.
+
 \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
 
 .. rst-class:: classref-item-separator