mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Sync classref with current source
This commit is contained in:
@@ -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<enum_CPUPa
|
||||
| *Getter* | get_emission_sphere_radius() |
|
||||
+----------+-----------------------------------+
|
||||
|
||||
The circle's radius if :ref:`emission_shape<class_CPUParticles2D_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_CIRCLE<class_CPUParticles2D_constant_EMISSION_SHAPE_CIRCLE>`.
|
||||
The sphere's radius if :ref:`emission_shape<class_CPUParticles2D_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_SPHERE<class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE>`.
|
||||
|
||||
.. _class_CPUParticles2D_property_emitting:
|
||||
|
||||
|
||||
+72
-26
@@ -168,13 +168,13 @@ Signals
|
||||
|
||||
- **item_activated** **(** :ref:`int<class_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<class_int>` index, :ref:`Vector2<class_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<class_int>` index **)**
|
||||
|
||||
Fired when specified item has been selected.
|
||||
Triggered when specified item has been selected.
|
||||
|
||||
:ref:`allow_reselect<class_ItemList_property_allow_reselect>` must be enabled to reselect an item.
|
||||
|
||||
@@ -194,16 +194,22 @@ Fired when specified item has been selected.
|
||||
|
||||
- **multi_selected** **(** :ref:`int<class_int>` index, :ref:`bool<class_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<class_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<class_ItemList_property_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<class_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<class_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<enum_ItemList_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<class_ItemList_constant_ICON_MODE_LEFT>` or :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>`.
|
||||
|
||||
.. _class_ItemList_property_icon_scale:
|
||||
|
||||
- :ref:`float<class_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<class_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<class_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_fixed_column_width>`.
|
||||
|
||||
.. _class_ItemList_property_select_mode:
|
||||
|
||||
- :ref:`SelectMode<enum_ItemList_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<enum_ItemList_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<class_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<class_Color>` **get_item_custom_bg_color** **(** :ref:`int<class_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<class_Color>` **get_item_custom_fg_color** **(** :ref:`int<class_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<class_Texture>` **get_item_icon** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the icon associated with the specified index. Default value is ``null``
|
||||
|
||||
.. _class_ItemList_method_get_item_icon_modulate:
|
||||
|
||||
- :ref:`Color<class_Color>` **get_item_icon_modulate** **(** :ref:`int<class_int>` idx **)** const
|
||||
@@ -424,29 +454,31 @@ Returns a :ref:`Color<class_Color>` modulating item's icon at the specified inde
|
||||
|
||||
- :ref:`Variant<class_Variant>` **get_item_metadata** **(** :ref:`int<class_int>` idx **)** const
|
||||
|
||||
Returns the metadata value of the specified index.
|
||||
|
||||
.. _class_ItemList_method_get_item_text:
|
||||
|
||||
- :ref:`String<class_String>` **get_item_text** **(** :ref:`int<class_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<class_String>` **get_item_tooltip** **(** :ref:`int<class_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<class_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<class_VScrollBar>` **get_v_scroll** **(** **)**
|
||||
|
||||
Returns the current vertical scroll bar for the List.
|
||||
Returns the :ref:`Object<class_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<class_bool>` **is_item_disabled** **(** :ref:`int<class_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<class_int>` from_idx, :ref:`int<class_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<class_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<class_int>` idx, :ref:`Color<class_Color>` custom_bg_color **)**
|
||||
|
||||
Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color<class_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<class_int>` idx, :ref:`Color<class_Color>` custom_fg_color **)**
|
||||
|
||||
Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color<class_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<class_int>` idx, :ref:`bool<class_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<class_int>` idx, :ref:`Texture<class_Texture>` icon **)**
|
||||
|
||||
Set (or replace) icon of the item at the specified index.
|
||||
Set (or replace) the icon's :ref:`Texture<class_Texture>` associated with the specified index.
|
||||
|
||||
.. _class_ItemList_method_set_item_icon_modulate:
|
||||
|
||||
- void **set_item_icon_modulate** **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` modulate **)**
|
||||
|
||||
Sets a modulating :ref:`Color<class_Color>` for item's icon at the specified index.
|
||||
Sets a modulating :ref:`Color<class_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<class_Color>` for item's icon at the specified ind
|
||||
|
||||
- void **set_item_metadata** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_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<class_int>` idx, :ref:`bool<class_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<class_int>` idx, :ref:`String<class_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<class_int>` idx, :ref:`String<class_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<class_int>` idx, :ref:`bool<class_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<class_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:
|
||||
|
||||
|
||||
@@ -149,6 +149,10 @@ Generate a noise image with the requested ``width`` and ``height``, based on the
|
||||
|
||||
- :ref:`float<class_float>` **get_noise_1d** **(** :ref:`float<class_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<class_float>` **get_noise_2d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
|
||||
|
||||
@@ -30,6 +30,10 @@ Properties
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`low_processor_usage_mode<class_OS_property_low_processor_usage_mode>` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`max_window_size<class_OS_property_max_window_size>` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`min_window_size<class_OS_property_min_window_size>` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`ScreenOrientation<enum_OS_ScreenOrientation>` | :ref:`screen_orientation<class_OS_property_screen_orientation>` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`vsync_enabled<class_OS_property_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<class_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<class_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<enum_OS_ScreenOrientation>` **screen_orientation**
|
||||
|
||||
+44
-10
@@ -250,6 +250,8 @@ Emitted when the cursor changes.
|
||||
|
||||
- **info_clicked** **(** :ref:`int<class_int>` row, :ref:`String<class_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_TextEdit_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<class_TextEdit_method_set_line_as_hidden>`, will not be visible.
|
||||
|
||||
.. _class_TextEdit_property_highlight_all_occurrences:
|
||||
|
||||
- :ref:`bool<class_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<class_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<class_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<class_String>` **text**
|
||||
@@ -574,7 +584,7 @@ Add color region (given the delimiters) and its colors.
|
||||
|
||||
- void **add_keyword_color** **(** :ref:`String<class_String>` keyword, :ref:`Color<class_Color>` color **)**
|
||||
|
||||
Add a keyword and its color.
|
||||
Add a ``keyword`` and its :ref:`Color<class_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<class_int>` column, :ref:`bool<class_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<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`bool<class_bool>` can_be_hidden=true, :ref:`int<class_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<class_TextEdit_method_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<class_Color>` **get_keyword_color** **(** :ref:`String<class_String>` keyword **)** const
|
||||
|
||||
Returns the :ref:`Color<class_Color>` of the specified ``keyword``.
|
||||
|
||||
.. _class_TextEdit_method_get_line:
|
||||
|
||||
- :ref:`String<class_String>` **get_line** **(** :ref:`int<class_int>` line **)** const
|
||||
@@ -706,26 +728,32 @@ Returns the selection end line.
|
||||
|
||||
- :ref:`String<class_String>` **get_word_under_cursor** **(** **)** const
|
||||
|
||||
Returns a :ref:`String<class_String>` text with the word under the mouse cursor location.
|
||||
|
||||
.. _class_TextEdit_method_has_keyword_color:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_keyword_color** **(** :ref:`String<class_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<class_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<class_bool>` **is_folded** **(** :ref:`int<class_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<class_bool>` **is_line_hidden** **(** :ref:`int<class_int>` line **)** const
|
||||
|
||||
Returns whether the line at the specified index is hidden or not.
|
||||
|
||||
.. _class_TextEdit_method_is_selection_active:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_selection_active** **(** **)** const
|
||||
@@ -736,6 +764,8 @@ Returns ``true`` if the selection is active.
|
||||
|
||||
- void **menu_option** **(** :ref:`int<class_int>` option **)**
|
||||
|
||||
Triggers a right click menu action by the specified index. See :ref:`MenuItems<enum_TextEdit_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<class_int>` line, :ref:`bool<class_bool>` enable **)**
|
||||
|
||||
If ``true``, hides the line of the specified index.
|
||||
|
||||
.. _class_TextEdit_method_toggle_fold_line:
|
||||
|
||||
- void **toggle_fold_line** **(** :ref:`int<class_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<class_TextEdit_method_set_line_as_hidden>`.
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ Clears the server from all translations.
|
||||
|
||||
- :ref:`Array<class_Array>` **get_loaded_locales** **(** **)** const
|
||||
|
||||
Returns an Array of all loaded locales of the game.
|
||||
|
||||
.. _class_TranslationServer_method_get_locale:
|
||||
|
||||
- :ref:`String<class_String>` **get_locale** **(** **)** const
|
||||
|
||||
@@ -21,9 +21,11 @@ Base class for WebSocket server and client.
|
||||
Methods
|
||||
-------
|
||||
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`WebSocketPeer<class_WebSocketPeer>` | :ref:`get_peer<class_WebSocketMultiplayerPeer_method_get_peer>` **(** :ref:`int<class_int>` peer_id **)** const |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`WebSocketPeer<class_WebSocketPeer>` | :ref:`get_peer<class_WebSocketMultiplayerPeer_method_get_peer>` **(** :ref:`int<class_int>` peer_id **)** const |
|
||||
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_buffers<class_WebSocketMultiplayerPeer_method_set_buffers>` **(** :ref:`int<class_int>` input_buffer_size_kb, :ref:`int<class_int>` input_max_packets, :ref:`int<class_int>` output_buffer_size_kb, :ref:`int<class_int>` output_max_packets **)** |
|
||||
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Signals
|
||||
-------
|
||||
@@ -48,3 +50,15 @@ Method Descriptions
|
||||
|
||||
Returns the :ref:`WebSocketPeer<class_WebSocketPeer>` associated to the given ``peer_id``.
|
||||
|
||||
.. _class_WebSocketMultiplayerPeer_method_set_buffers:
|
||||
|
||||
- :ref:`Error<enum_@GlobalScope_Error>` **set_buffers** **(** :ref:`int<class_int>` input_buffer_size_kb, :ref:`int<class_int>` input_max_packets, :ref:`int<class_int>` output_buffer_size_kb, :ref:`int<class_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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user