From fb4344a9e1f4fd80c76617a588f9df4d21101e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 18 Jun 2019 15:26:52 +0200 Subject: [PATCH] Sync classref with current source --- classes/class_cpuparticles2d.rst | 6 +- classes/class_itemlist.rst | 98 ++++++++++++++++------ classes/class_opensimplexnoise.rst | 4 + classes/class_os.rst | 28 +++++++ classes/class_textedit.rst | 54 +++++++++--- classes/class_translationserver.rst | 2 + classes/class_websocketmultiplayerpeer.rst | 20 ++++- 7 files changed, 170 insertions(+), 42 deletions(-) diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 0b08842e6..0ab1dfa76 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -247,7 +247,7 @@ enum **Flags**: .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT: -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_CIRCLE: +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE: .. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE: @@ -259,7 +259,7 @@ enum **EmissionShape**: - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. -- **EMISSION_SHAPE_CIRCLE** = **1** --- Particles will be emitted on the perimeter of a circle. +- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted on the surface of a sphere flattened to two dimensions. - **EMISSION_SHAPE_RECTANGLE** = **2** --- Particles will be emitted in the area of a rectangle. @@ -574,7 +574,7 @@ Particles will be emitted inside this region. Use :ref:`EmissionShape` is set to :ref:`EMISSION_SHAPE_CIRCLE`. +The sphere's radius if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_SPHERE`. .. _class_CPUParticles2D_property_emitting: diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 6d7502089..031c8648c 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -168,13 +168,13 @@ Signals - **item_activated** **(** :ref:`int` index **)** -Fired when specified list item is activated via double click or Enter. +Triggered when specified list item is activated via double click or Enter. .. _class_ItemList_signal_item_rmb_selected: - **item_rmb_selected** **(** :ref:`int` index, :ref:`Vector2` at_position **)** -Fired when specified list item has been selected via right mouse clicking. +Triggered when specified list item has been selected via right mouse clicking. The click position is also provided to allow appropriate popup of context menus @@ -186,7 +186,7 @@ at the correct location. - **item_selected** **(** :ref:`int` index **)** -Fired when specified item has been selected. +Triggered when specified item has been selected. :ref:`allow_reselect` must be enabled to reselect an item. @@ -194,16 +194,22 @@ Fired when specified item has been selected. - **multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** -Fired when a multiple selection is altered on a list allowing multiple selection. +Triggered when a multiple selection is altered on a list allowing multiple selection. .. _class_ItemList_signal_nothing_selected: - **nothing_selected** **(** **)** +Triggered when a left mouse click is issued within the rect of the list but on empty space. + .. _class_ItemList_signal_rmb_clicked: - **rmb_clicked** **(** :ref:`Vector2` at_position **)** +Triggered when a right mouse click is issued within the rect of the list but on empty space. + +:ref:`allow_rmb_select` must be enabled. + Enumerations ------------ @@ -251,7 +257,7 @@ Property Descriptions | *Getter* | get_allow_reselect() | +----------+---------------------------+ -If ``true``, the currently selected item may be selected again. +If ``true``, the currently selected item can be selected again. .. _class_ItemList_property_allow_rmb_select: @@ -263,7 +269,7 @@ If ``true``, the currently selected item may be selected again. | *Getter* | get_allow_rmb_select() | +----------+-----------------------------+ -If ``true``, a right mouse button click can select items. +If ``true``, right mouse button click can select items. .. _class_ItemList_property_auto_height: @@ -275,6 +281,8 @@ If ``true``, a right mouse button click can select items. | *Getter* | has_auto_height() | +----------+------------------------+ +If ``true``, the control will automatically resize the height to fit its content. + .. _class_ItemList_property_fixed_column_width: - :ref:`int` **fixed_column_width** @@ -285,6 +293,10 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_fixed_column_width() | +----------+-------------------------------+ +Sets the default column width in pixels. + +If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. + .. _class_ItemList_property_fixed_icon_size: - :ref:`Vector2` **fixed_icon_size** @@ -295,6 +307,8 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_fixed_icon_size() | +----------+----------------------------+ +Sets the default icon size in pixels. + .. _class_ItemList_property_icon_mode: - :ref:`IconMode` **icon_mode** @@ -305,6 +319,8 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_icon_mode() | +----------+----------------------+ +Sets the default position of the icon to either :ref:`ICON_MODE_LEFT` or :ref:`ICON_MODE_TOP`. + .. _class_ItemList_property_icon_scale: - :ref:`float` **icon_scale** @@ -315,6 +331,8 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_icon_scale() | +----------+-----------------------+ +Sets the icon size to its initial size multiplied by the specified scale. Default value is 1.0. + .. _class_ItemList_property_max_columns: - :ref:`int` **max_columns** @@ -325,6 +343,10 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_max_columns() | +----------+------------------------+ +Sets the maximum columns the list will have. + +If set to anything other than the default, the content will be split among the specified columns. + .. _class_ItemList_property_max_text_lines: - :ref:`int` **max_text_lines** @@ -345,6 +367,8 @@ If ``true``, a right mouse button click can select items. | *Getter* | is_same_column_width() | +----------+------------------------------+ +If set to ``true``, all columns will have the same width specified by :ref:`fixed_column_width`. + .. _class_ItemList_property_select_mode: - :ref:`SelectMode` **select_mode** @@ -355,7 +379,7 @@ If ``true``, a right mouse button click can select items. | *Getter* | get_select_mode() | +----------+------------------------+ -Allow single or multiple selection. See the ``SELECT_*`` constants. +Allow single or multiple item selection. See the :ref:`SelectMode` constants. Method Descriptions ------------------- @@ -384,7 +408,7 @@ Remove all items from the list. - void **ensure_current_is_visible** **(** **)** -Ensure selection is visible, adjusting the scroll position as necessary. +Ensure current selection is visible, adjusting the scroll position as necessary. .. _class_ItemList_method_get_item_at_position: @@ -396,20 +420,26 @@ Given a position within the control return the item (if any) at that point. - :ref:`int` **get_item_count** **(** **)** const -Returns count of items currently in the item list. +Returns the number of items currently in the list. .. _class_ItemList_method_get_item_custom_bg_color: - :ref:`Color` **get_item_custom_bg_color** **(** :ref:`int` idx **)** const +Returns the custom background color of the item specified by ``idx`` index. Default value is ``Color(0, 0, 0, 0)``. + .. _class_ItemList_method_get_item_custom_fg_color: - :ref:`Color` **get_item_custom_fg_color** **(** :ref:`int` idx **)** const +Returns the custom foreground color of the item specified by ``idx`` index. Default value is ``Color(0, 0, 0, 0)``. + .. _class_ItemList_method_get_item_icon: - :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const +Returns the icon associated with the specified index. Default value is ``null`` + .. _class_ItemList_method_get_item_icon_modulate: - :ref:`Color` **get_item_icon_modulate** **(** :ref:`int` idx **)** const @@ -424,29 +454,31 @@ Returns a :ref:`Color` modulating item's icon at the specified inde - :ref:`Variant` **get_item_metadata** **(** :ref:`int` idx **)** const +Returns the metadata value of the specified index. + .. _class_ItemList_method_get_item_text: - :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const -Returns the text for specified item index. +Returns the text associated with the specified index. .. _class_ItemList_method_get_item_tooltip: - :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** const -Returns tooltip hint for specified item index. +Returns the tooltip hint associated with the specified index. .. _class_ItemList_method_get_selected_items: - :ref:`PoolIntArray` **get_selected_items** **(** **)** -Returns the list of selected indexes. +Returns an array with the indexes of the selected items. .. _class_ItemList_method_get_v_scroll: - :ref:`VScrollBar` **get_v_scroll** **(** **)** -Returns the current vertical scroll bar for the List. +Returns the :ref:`Object` ID associated with the list. .. _class_ItemList_method_is_anything_selected: @@ -458,7 +490,7 @@ Returns ``true`` if one or more items are selected. - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const -Returns whether or not the item at the specified index is disabled +Returns whether or not the item at the specified index is disabled. .. _class_ItemList_method_is_item_icon_transposed: @@ -486,13 +518,13 @@ Returns whether or not item at the specified index is currently selected. - void **move_item** **(** :ref:`int` from_idx, :ref:`int` to_idx **)** -Moves item at index ``from_idx`` to ``to_idx``. +Moves item from index ``from_idx`` to ``to_idx``. .. _class_ItemList_method_remove_item: - void **remove_item** **(** :ref:`int` idx **)** -Remove item at specified index from the list. +Removes the item specified by ``idx`` index from the list. .. _class_ItemList_method_select: @@ -506,29 +538,43 @@ Note: This method does not trigger the item selection signal. - void **set_item_custom_bg_color** **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** +Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color`. + +:: + + var some_string = "Some text" + some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red. + .. _class_ItemList_method_set_item_custom_fg_color: - void **set_item_custom_fg_color** **(** :ref:`int` idx, :ref:`Color` custom_fg_color **)** +Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color`. + +:: + + var some_string = "Some text" + some_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red. + .. _class_ItemList_method_set_item_disabled: - void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** -Disable (or enable) item at specified index. +Disable (or enable) item at the specified index. -Disabled items are not be selectable and do not fire activation (Enter or double-click) signals. +Disabled items are not be selectable and do not trigger activation (Enter or double-click) signals. .. _class_ItemList_method_set_item_icon: - void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` icon **)** -Set (or replace) icon of the item at the specified index. +Set (or replace) the icon's :ref:`Texture` associated with the specified index. .. _class_ItemList_method_set_item_icon_modulate: - void **set_item_icon_modulate** **(** :ref:`int` idx, :ref:`Color` modulate **)** -Sets a modulating :ref:`Color` for item's icon at the specified index. +Sets a modulating :ref:`Color` of the item associated with the specified index. .. _class_ItemList_method_set_item_icon_region: @@ -542,31 +588,31 @@ Sets a modulating :ref:`Color` for item's icon at the specified ind - void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** -Sets a value (of any type) to be stored with the item at the specified index. +Sets a value (of any type) to be stored with the item associated with the specified index. .. _class_ItemList_method_set_item_selectable: - void **set_item_selectable** **(** :ref:`int` idx, :ref:`bool` selectable **)** -Allow or disallow selection of the item at the specified index. +Allow or disallow selection of the item associated with the specified index. .. _class_ItemList_method_set_item_text: - void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** -Sets text of item at specified index. +Sets text of the item associated with the specified index. .. _class_ItemList_method_set_item_tooltip: - void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** -Sets tooltip hint for item at specified index. +Sets tooltip hint for the item associated with the specified index. .. _class_ItemList_method_set_item_tooltip_enabled: - void **set_item_tooltip_enabled** **(** :ref:`int` idx, :ref:`bool` enable **)** -Sets whether the tooltip is enabled for specified item index. +Sets whether the tooltip hint is enabled for specified item index. .. _class_ItemList_method_sort_items_by_text: @@ -578,7 +624,7 @@ Sorts items in the list by their text. - void **unselect** **(** :ref:`int` idx **)** -Ensure item at specified index is not selected. +Ensure the item associated with the specified index is not selected. .. _class_ItemList_method_unselect_all: diff --git a/classes/class_opensimplexnoise.rst b/classes/class_opensimplexnoise.rst index 73b6bdda1..cc0383e65 100644 --- a/classes/class_opensimplexnoise.rst +++ b/classes/class_opensimplexnoise.rst @@ -149,6 +149,10 @@ Generate a noise image with the requested ``width`` and ``height``, based on the - :ref:`float` **get_noise_1d** **(** :ref:`float` x **)** +Returns the 1D noise value ``[-1,1]`` at the given x-coordinate. + +Note: This method actually returns the 2D noise value ``[-1,1]`` with fixed y-coordinate value 0.0. + .. _class_OpenSimplexNoise_method_get_noise_2d: - :ref:`float` **get_noise_2d** **(** :ref:`float` x, :ref:`float` y **)** diff --git a/classes/class_os.rst b/classes/class_os.rst index 71e9784ad..e22d3f46f 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -30,6 +30,10 @@ Properties +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`low_processor_usage_mode` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`max_window_size` | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`min_window_size` | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`ScreenOrientation` | :ref:`screen_orientation` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`vsync_enabled` | @@ -499,6 +503,30 @@ If ``true``, the engine tries to keep the screen on while the game is running. U If ``true``, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. +.. _class_OS_property_max_window_size: + +- :ref:`Vector2` **max_window_size** + ++----------+----------------------------+ +| *Setter* | set_max_window_size(value) | ++----------+----------------------------+ +| *Getter* | get_max_window_size() | ++----------+----------------------------+ + +The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to ``(0, 0)`` to reset to the system default value. + +.. _class_OS_property_min_window_size: + +- :ref:`Vector2` **min_window_size** + ++----------+----------------------------+ +| *Setter* | set_min_window_size(value) | ++----------+----------------------------+ +| *Getter* | get_min_window_size() | ++----------+----------------------------+ + +The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to ``(0, 0)`` to reset to the system default value. + .. _class_OS_property_screen_orientation: - :ref:`ScreenOrientation` **screen_orientation** diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index e3f412f76..2951112f5 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -250,6 +250,8 @@ Emitted when the cursor changes. - **info_clicked** **(** :ref:`int` row, :ref:`String` info **)** +Emitted when the info icon is clicked. + .. _class_TextEdit_signal_request_completion: - **request_completion** **(** **)** @@ -315,9 +317,9 @@ enum **MenuItems**: - **MENU_UNDO** = **5** --- Undoes the previous action. -- **MENU_REDO** = **6** +- **MENU_REDO** = **6** --- Redoes the previous action. -- **MENU_MAX** = **7** +- **MENU_MAX** = **7** --- Represents the size of the :ref:`MenuItems` enum. Description ----------- @@ -449,6 +451,8 @@ If ``true``, the fold gutter is visible. This enables folding groups of indented | *Getter* | is_hiding_enabled() | +----------+---------------------------+ +If ``true``, all lines that have been set to hidden by :ref:`set_line_as_hidden`, will not be visible. + .. _class_TextEdit_property_highlight_all_occurrences: - :ref:`bool` **highlight_all_occurrences** @@ -459,6 +463,8 @@ If ``true``, the fold gutter is visible. This enables folding groups of indented | *Getter* | is_highlight_all_occurrences_enabled() | +----------+----------------------------------------+ +If ``true``, all occurrences of the selected text will be highlighted. + .. _class_TextEdit_property_highlight_current_line: - :ref:`bool` **highlight_current_line** @@ -515,6 +521,8 @@ If ``true``, line numbers are displayed to the left of the text. | *Getter* | is_smooth_scroll_enabled() | +----------+---------------------------------+ +If ``true``, sets the ``step`` of the scrollbars to ``0.25`` which results in smoother scrolling. + .. _class_TextEdit_property_syntax_highlighting: - :ref:`bool` **syntax_highlighting** @@ -525,6 +533,8 @@ If ``true``, line numbers are displayed to the left of the text. | *Getter* | is_syntax_coloring_enabled() | +----------+------------------------------+ +If ``true``, any custom color properties that have been set for this ``TextEdit`` will be visible. + .. _class_TextEdit_property_text: - :ref:`String` **text** @@ -574,7 +584,7 @@ Add color region (given the delimiters) and its colors. - void **add_keyword_color** **(** :ref:`String` keyword, :ref:`Color` color **)** -Add a keyword and its color. +Add a ``keyword`` and its :ref:`Color`. .. _class_TextEdit_method_can_fold: @@ -586,19 +596,19 @@ Returns if the given line is foldable, that is, it has indented lines right belo - void **clear_colors** **(** **)** -Clear all the syntax coloring information. +Clears all the syntax coloring information. .. _class_TextEdit_method_clear_undo_history: - void **clear_undo_history** **(** **)** -Clear the undo history. +Clears the undo history. .. _class_TextEdit_method_copy: - void **copy** **(** **)** -Copy the current selection. +Copy's the current text selection. .. _class_TextEdit_method_cursor_get_column: @@ -616,21 +626,31 @@ Returns the line the editing cursor is at. - void **cursor_set_column** **(** :ref:`int` column, :ref:`bool` adjust_viewport=true **)** +Moves the cursor at the specified ``column`` index. + +If ``adjust_viewport`` is set to true, the viewport will center at the cursor position after the move occurs. Default value is ``true``. + .. _class_TextEdit_method_cursor_set_line: - void **cursor_set_line** **(** :ref:`int` line, :ref:`bool` adjust_viewport=true, :ref:`bool` can_be_hidden=true, :ref:`int` wrap_index=0 **)** +Moves the cursor at the specified ``line`` index. + +If ``adjust_viewport`` is set to true, the viewport will center at the cursor position after the move occurs. Default value is ``true``. + +If ``can_be_hidden`` is set to true, the specified ``line`` can be hidden using :ref:`set_line_as_hidden`. Default value is ``true``. + .. _class_TextEdit_method_cut: - void **cut** **(** **)** -Cut the current selection. +Cut's the current selection. .. _class_TextEdit_method_deselect: - void **deselect** **(** **)** -Clears the current selection. +Deselects the current selection. .. _class_TextEdit_method_fold_all_lines: @@ -654,6 +674,8 @@ Returns an array containing the line number of each breakpoint. - :ref:`Color` **get_keyword_color** **(** :ref:`String` keyword **)** const +Returns the :ref:`Color` of the specified ``keyword``. + .. _class_TextEdit_method_get_line: - :ref:`String` **get_line** **(** :ref:`int` line **)** const @@ -706,26 +728,32 @@ Returns the selection end line. - :ref:`String` **get_word_under_cursor** **(** **)** const +Returns a :ref:`String` text with the word under the mouse cursor location. + .. _class_TextEdit_method_has_keyword_color: - :ref:`bool` **has_keyword_color** **(** :ref:`String` keyword **)** const +Returns whether the specified ``keyword`` has a color set to it or not. + .. _class_TextEdit_method_insert_text_at_cursor: - void **insert_text_at_cursor** **(** :ref:`String` text **)** -Insert a given text at the cursor position. +Insert the specified text at the cursor position. .. _class_TextEdit_method_is_folded: - :ref:`bool` **is_folded** **(** :ref:`int` line **)** const -Returns if the given line is folded. +Returns whether the line at the specified index is folded or not. .. _class_TextEdit_method_is_line_hidden: - :ref:`bool` **is_line_hidden** **(** :ref:`int` line **)** const +Returns whether the line at the specified index is hidden or not. + .. _class_TextEdit_method_is_selection_active: - :ref:`bool` **is_selection_active** **(** **)** const @@ -736,6 +764,8 @@ Returns ``true`` if the selection is active. - void **menu_option** **(** :ref:`int` option **)** +Triggers a right click menu action by the specified index. See :ref:`MenuItems` for a list of available indexes. + .. _class_TextEdit_method_paste: - void **paste** **(** **)** @@ -776,6 +806,8 @@ Select all the text. - void **set_line_as_hidden** **(** :ref:`int` line, :ref:`bool` enable **)** +If ``true``, hides the line of the specified index. + .. _class_TextEdit_method_toggle_fold_line: - void **toggle_fold_line** **(** :ref:`int` line **)** @@ -798,3 +830,5 @@ Unfolds the given line, if folded. - void **unhide_all_lines** **(** **)** +Unhide all lines that were previously set to hidden by :ref:`set_line_as_hidden`. + diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 620a74f0f..d6a705be2 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -68,6 +68,8 @@ Clears the server from all translations. - :ref:`Array` **get_loaded_locales** **(** **)** const +Returns an Array of all loaded locales of the game. + .. _class_TranslationServer_method_get_locale: - :ref:`String` **get_locale** **(** **)** const diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index efa30771f..47cdafe51 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -21,9 +21,11 @@ Base class for WebSocket server and client. Methods ------- -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`WebSocketPeer` | :ref:`get_peer` **(** :ref:`int` peer_id **)** const | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`WebSocketPeer` | :ref:`get_peer` **(** :ref:`int` peer_id **)** const | ++-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`set_buffers` **(** :ref:`int` input_buffer_size_kb, :ref:`int` input_max_packets, :ref:`int` output_buffer_size_kb, :ref:`int` output_max_packets **)** | ++-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -48,3 +50,15 @@ Method Descriptions Returns the :ref:`WebSocketPeer` associated to the given ``peer_id``. +.. _class_WebSocketMultiplayerPeer_method_set_buffers: + +- :ref:`Error` **set_buffers** **(** :ref:`int` input_buffer_size_kb, :ref:`int` input_max_packets, :ref:`int` output_buffer_size_kb, :ref:`int` output_max_packets **)** + +Configure the buffers sizes for this WebSocket peer. Default values can be specified in project settings under ``network/limits``. For server, values are meant per connected peer. + +The first two parameters define the size and queued packets limits of the input buffer, the last two of the output buffer. + +Buffer sizes are expressed in KiB, so ``4 = 2^12 = 4096 bytes``. All parameters will be rounded up to the nearest power of two. + +NOTE: HTML5 exports only use the input buffer since the output one is managed by browsers. +