mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
1635 lines
92 KiB
ReStructuredText
1635 lines
92 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_ItemList:
|
||
|
||
ItemList
|
||
========
|
||
|
||
**Успадковує:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Вертикальний список виділених елементів з одним або декількома стовпчиками.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
Цей контроль забезпечує вертикальний список вибраних елементів, які можуть бути в одному або в декількох стовпчиках, з кожним елементом, що має параметри для тексту і іконки. Підтримуються та можуть бути різними для кожного елемента в списку.
|
||
|
||
Вибрані елементи в списку можуть бути вибрані або вилучені і багаторазові виділення можуть бути включені. Підбір з правою кнопкою миші також може бути включений, щоб дозволити використовувати контекстні меню. Товари можуть бути "активовані" за допомогою подвійного затискання їх або натиснувши :kbd:`Enter`.
|
||
|
||
Текст тільки підтримує однолінійні рядки. Нові символи (наприклад, ``\n``) в рядку не виготовить новий рядок. Текстове обгортання ввімкнено в режимі :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>`, але ширина стовпця регульована для повністю придатного його вмісту за замовчуванням. Вам потрібно встановити :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` більше нуля, щоб обгорнути текст.
|
||
|
||
Всі ``set_*`` методи дозволяють індексувати негативний елемент, тобто ``-1`` для доступу до останнього елемента ``-2`` для вибору другого елемента, і так далі.
|
||
|
||
\ **Incremental search:** Подібно :ref:`PopupMenu<class_PopupMenu>` і :ref:`Tree<class_Tree>`, **ItemList** підтримує пошук у списку, коли фокусується контроль. Натисніть клавішу, яка відповідає першому листу назви пункту, щоб вибрати перший елемент, починаючи з даного листа. Після того, як точка, є два способи виконання вступного пошуку: 1) Натисніть той же ключ знову до закінчення часу, щоб вибрати наступний пункт, починаючи з того ж листа. 2) Натисніть клавіші літери, які відповідають решті слова перед тривалістю часу, щоб відповідати вибору пункту прямо. І з цих дій буде скидання на початок списку, якщо тривалість від’їзду з останнього ключа було зареєстровано. Ви можете налаштувати тривалість часу, змінивши :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec<class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec>`.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_reselect<class_ItemList_property_allow_reselect>` | ``false`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_rmb_select<class_ItemList_property_allow_rmb_select>` | ``false`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_search<class_ItemList_property_allow_search>` | ``true`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`auto_height<class_ItemList_property_auto_height>` | ``false`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`auto_width<class_ItemList_property_auto_width>` | ``false`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` | ``0`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`Vector2i<class_Vector2i>` | :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` | ``Vector2i(0, 0)`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`IconMode<enum_ItemList_IconMode>` | :ref:`icon_mode<class_ItemList_property_icon_mode>` | ``1`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`icon_scale<class_ItemList_property_icon_scale>` | ``1.0`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`item_count<class_ItemList_property_item_count>` | ``0`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`max_columns<class_ItemList_property_max_columns>` | ``1`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`max_text_lines<class_ItemList_property_max_text_lines>` | ``1`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`same_column_width<class_ItemList_property_same_column_width>` | ``false`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` | :ref:`scroll_hint_mode<class_ItemList_property_scroll_hint_mode>` | ``0`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`SelectMode<enum_ItemList_SelectMode>` | :ref:`select_mode<class_ItemList_property_select_mode>` | ``0`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`text_overrun_behavior<class_ItemList_property_text_overrun_behavior>` | ``3`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`tile_scroll_hint<class_ItemList_property_tile_scroll_hint>` | ``false`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`wraparound_items<class_ItemList_property_wraparound_items>` | ``true`` |
|
||
+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`add_icon_item<class_ItemList_method_add_icon_item>`\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`add_item<class_ItemList_method_add_item>`\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear<class_ItemList_method_clear>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`deselect<class_ItemList_method_deselect>`\ (\ idx\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`deselect_all<class_ItemList_method_deselect_all>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`ensure_current_is_visible<class_ItemList_method_ensure_current_is_visible>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`force_update_list_size<class_ItemList_method_force_update_list_size>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_ItemList_method_get_h_scroll_bar>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_item_at_position<class_ItemList_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`get_item_auto_translate_mode<class_ItemList_method_get_item_auto_translate_mode>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_item_custom_bg_color<class_ItemList_method_get_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_item_custom_fg_color<class_ItemList_method_get_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_ItemList_method_get_item_icon>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_ItemList_method_get_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_item_icon_region<class_ItemList_method_get_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_item_language<class_ItemList_method_get_item_language>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_ItemList_method_get_item_metadata>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_ItemList_method_get_item_rect>`\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_item_text<class_ItemList_method_get_item_text>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_ItemList_method_get_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_item_tooltip<class_ItemList_method_get_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_selected_items<class_ItemList_method_get_selected_items>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ItemList_method_get_v_scroll_bar>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_anything_selected<class_ItemList_method_is_anything_selected>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_ItemList_method_is_item_disabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_item_icon_transposed<class_ItemList_method_is_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_item_selectable<class_ItemList_method_is_item_selectable>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_item_tooltip_enabled<class_ItemList_method_is_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_selected<class_ItemList_method_is_selected>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`move_item<class_ItemList_method_move_item>`\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_item<class_ItemList_method_remove_item>`\ (\ idx\: :ref:`int<class_int>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`select<class_ItemList_method_select>`\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_auto_translate_mode<class_ItemList_method_set_item_auto_translate_mode>`\ (\ idx\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_custom_bg_color<class_ItemList_method_set_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_custom_fg_color<class_ItemList_method_set_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_disabled<class_ItemList_method_set_item_disabled>`\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_icon<class_ItemList_method_set_item_icon>`\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_icon_modulate<class_ItemList_method_set_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_icon_region<class_ItemList_method_set_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_icon_transposed<class_ItemList_method_set_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_language<class_ItemList_method_set_item_language>`\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_metadata<class_ItemList_method_set_item_metadata>`\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_selectable<class_ItemList_method_set_item_selectable>`\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_text<class_ItemList_method_set_item_text>`\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_text_direction<class_ItemList_method_set_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_tooltip<class_ItemList_method_set_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_item_tooltip_enabled<class_ItemList_method_set_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`sort_items_by_text<class_ItemList_method_sort_items_by_text>`\ (\ ) |
|
||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості теми
|
||
--------------------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_color<class_ItemList_theme_color_font_color>` | ``Color(0.65, 0.65, 0.65, 1)`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_ItemList_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_hovered_selected_color<class_ItemList_theme_color_font_hovered_selected_color>` | ``Color(1, 1, 1, 1)`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ItemList_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_selected_color<class_ItemList_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`guide_color<class_ItemList_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`h_separation<class_ItemList_theme_constant_h_separation>` | ``4`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`icon_margin<class_ItemList_theme_constant_icon_margin>` | ``4`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`line_separation<class_ItemList_theme_constant_line_separation>` | ``2`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`outline_size<class_ItemList_theme_constant_outline_size>` | ``0`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`v_separation<class_ItemList_theme_constant_v_separation>` | ``4`` |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Font<class_Font>` | :ref:`font<class_ItemList_theme_font_font>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_size<class_ItemList_theme_font_size_font_size>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`scroll_hint<class_ItemList_theme_icon_scroll_hint>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_ItemList_theme_style_cursor>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_ItemList_theme_style_cursor_unfocused>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_ItemList_theme_style_focus>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered<class_ItemList_theme_style_hovered>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected<class_ItemList_theme_style_hovered_selected>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_selected_focus<class_ItemList_theme_style_hovered_selected_focus>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_ItemList_theme_style_panel>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_ItemList_theme_style_selected>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_ItemList_theme_style_selected_focus>` | |
|
||
+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Сигнали
|
||
--------------
|
||
|
||
.. _class_ItemList_signal_empty_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**empty_clicked**\ (\ at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_empty_clicked>`
|
||
|
||
Випускається, коли будь-яке клацання мишею виконується в правій частині списку, але на порожньому місці.
|
||
|
||
\ ``at_position`` — це позиція клацання в локальній системі координат цього елемента керування.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_signal_item_activated:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_activated**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_activated>`
|
||
|
||
Видається, коли вказаний елемент списку активується подвійним клацанням або натисканням :kbd:`Enter`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_signal_item_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_clicked**\ (\ index\: :ref:`int<class_int>`, at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_clicked>`
|
||
|
||
Видається, коли вказаний елемент списку клацнуто будь-якою кнопкою миші.
|
||
|
||
\ ``at_position`` — це позиція клацання в локальній системі координат цього елемента керування.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_signal_item_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**item_selected**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_selected>`
|
||
|
||
Видається, коли вибрано вказаний елемент. Застосовується лише в режимі одного вибору.
|
||
|
||
Для повторного вибору елемента потрібно ввімкнути :ref:`allow_reselect<class_ItemList_property_allow_reselect>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_signal_multi_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**multi_selected**\ (\ index\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_signal_multi_selected>`
|
||
|
||
Випускається, коли множинний вибір змінюється у списку, що дозволяє множинний вибір.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Переліки
|
||
----------------
|
||
|
||
.. _enum_ItemList_IconMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **IconMode**: :ref:`🔗<enum_ItemList_IconMode>`
|
||
|
||
.. _class_ItemList_constant_ICON_MODE_TOP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_TOP** = ``0``
|
||
|
||
Ікона намальована над текстом.
|
||
|
||
.. _class_ItemList_constant_ICON_MODE_LEFT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`IconMode<enum_ItemList_IconMode>` **ICON_MODE_LEFT** = ``1``
|
||
|
||
Ікона тягнеться зліва від тексту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_ItemList_SelectMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **SelectMode**: :ref:`🔗<enum_ItemList_SelectMode>`
|
||
|
||
.. _class_ItemList_constant_SELECT_SINGLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_SINGLE** = ``0``
|
||
|
||
Тільки дозволяє вибрати один елемент.
|
||
|
||
.. _class_ItemList_constant_SELECT_MULTI:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_MULTI** = ``1``
|
||
|
||
Дозволяє вибрати декілька елементів за допомогою холдингу :kbd:`Ctrl` або :kbd:`Shift`.
|
||
|
||
.. _class_ItemList_constant_SELECT_TOGGLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SelectMode<enum_ItemList_SelectMode>` **SELECT_TOGGLE** = ``2``
|
||
|
||
Дозволяє вибирати кілька елементів, умикаючи та вимикаючи їх.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_ItemList_ScrollHintMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **ScrollHintMode**: :ref:`🔗<enum_ItemList_ScrollHintMode>`
|
||
|
||
.. _class_ItemList_constant_SCROLL_HINT_MODE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` **SCROLL_HINT_MODE_DISABLED** = ``0``
|
||
|
||
Scroll hints will never be shown.
|
||
|
||
.. _class_ItemList_constant_SCROLL_HINT_MODE_BOTH:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` **SCROLL_HINT_MODE_BOTH** = ``1``
|
||
|
||
Scroll hints will be shown at the top and bottom.
|
||
|
||
.. _class_ItemList_constant_SCROLL_HINT_MODE_TOP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` **SCROLL_HINT_MODE_TOP** = ``2``
|
||
|
||
Only the top scroll hint will be shown.
|
||
|
||
.. _class_ItemList_constant_SCROLL_HINT_MODE_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` **SCROLL_HINT_MODE_BOTTOM** = ``3``
|
||
|
||
Only the bottom scroll hint will be shown.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_ItemList_property_allow_reselect:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_ItemList_property_allow_reselect>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_allow_reselect**\ (\ )
|
||
|
||
Якщо ``true``, в даний час вибраний пункт можна вибрати знову.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_allow_rmb_select:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_ItemList_property_allow_rmb_select>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ )
|
||
|
||
Якщо ``true``, клацніть правою кнопкою миші можна вибрати елементи.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_allow_search:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_ItemList_property_allow_search>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_allow_search**\ (\ )
|
||
|
||
Якщо ``true``, дозволяє навігувати **ItemList** з літерними ключами через незнімний пошук.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_auto_height:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **auto_height** = ``false`` :ref:`🔗<class_ItemList_property_auto_height>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_auto_height**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **has_auto_height**\ (\ )
|
||
|
||
Якщо ``true``, контроль буде автоматично змінювати висоту, щоб відповідати його вмісту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_auto_width:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **auto_width** = ``false`` :ref:`🔗<class_ItemList_property_auto_width>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_auto_width**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **has_auto_width**\ (\ )
|
||
|
||
Якщо ``true``, елемент керування автоматично змінить розмір ширини відповідно до вмісту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_fixed_column_width:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **fixed_column_width** = ``0`` :ref:`🔗<class_ItemList_property_fixed_column_width>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fixed_column_width**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_fixed_column_width**\ (\ )
|
||
|
||
Ширина всіх стовпчиків буде регулюватися.
|
||
|
||
Значення нульового відключення регулювання, кожен елемент буде мати ширину його вмісту і стовпці будуть мати нерівну ширину.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_fixed_icon_size:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector2i<class_Vector2i>` **fixed_icon_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_ItemList_property_fixed_icon_size>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fixed_icon_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
|
||
- :ref:`Vector2i<class_Vector2i>` **get_fixed_icon_size**\ (\ )
|
||
|
||
Розмір всіх іконок буде регулюватися.
|
||
|
||
Якщо компонент X або Y не більше нуль, розмір ікони не буде впливати.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_icon_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`IconMode<enum_ItemList_IconMode>` **icon_mode** = ``1`` :ref:`🔗<class_ItemList_property_icon_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_icon_mode**\ (\ value\: :ref:`IconMode<enum_ItemList_IconMode>`\ )
|
||
- :ref:`IconMode<enum_ItemList_IconMode>` **get_icon_mode**\ (\ )
|
||
|
||
Положення значка, над текстом чи ліворуч від нього. Див. константи :ref:`IconMode<enum_ItemList_IconMode>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_icon_scale:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **icon_scale** = ``1.0`` :ref:`🔗<class_ItemList_property_icon_scale>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_icon_scale**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_icon_scale**\ (\ )
|
||
|
||
Масштаб значка, застосований після :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` та транспонування, набуває чинності.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_item_count:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_ItemList_property_item_count>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_item_count**\ (\ )
|
||
|
||
Кількість елементів в даний час в списку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_max_columns:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **max_columns** = ``1`` :ref:`🔗<class_ItemList_property_max_columns>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_max_columns**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_max_columns**\ (\ )
|
||
|
||
Максимальна кількість стовпців буде мати список.
|
||
|
||
Якщо більше нуль, вміст буде розбити серед зазначених стовпчиків.
|
||
|
||
Значення нуля означає необмежені стовпчики, тобто всі елементи будуть розміщені в одному ряду.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_max_text_lines:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **max_text_lines** = ``1`` :ref:`🔗<class_ItemList_property_max_text_lines>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_max_text_lines**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_max_text_lines**\ (\ )
|
||
|
||
Максимальні лінії тексту дозволені в кожному елементі. Простір буде зарезервований навіть якщо не вистачає рядків для відображення.
|
||
|
||
\ **Примітка:** Ця властивість діє тільки тоді, коли :ref:`icon_mode<class_ItemList_property_icon_mode>` :ref:`ICON_MODE_TOP<class_ItemList_constant_ICON_MODE_TOP>`. Щоб зробити текстове обгортання, :ref:`fixed_column_width<class_ItemList_property_fixed_column_width>` повинна бути більш ніж нуль.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_same_column_width:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **same_column_width** = ``false`` :ref:`🔗<class_ItemList_property_same_column_width>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_same_column_width**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_same_column_width**\ (\ )
|
||
|
||
Якщо всі стовпчики будуть мати однакову ширину.
|
||
|
||
Якщо ``true``, ширина дорівнює найбільшій ширини колонки всіх стовпчиків.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_scroll_hint_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` **scroll_hint_mode** = ``0`` :ref:`🔗<class_ItemList_property_scroll_hint_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_scroll_hint_mode**\ (\ value\: :ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>`\ )
|
||
- :ref:`ScrollHintMode<enum_ItemList_ScrollHintMode>` **get_scroll_hint_mode**\ (\ )
|
||
|
||
The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_select_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`SelectMode<enum_ItemList_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_ItemList_property_select_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_ItemList_SelectMode>`\ )
|
||
- :ref:`SelectMode<enum_ItemList_SelectMode>` **get_select_mode**\ (\ )
|
||
|
||
Дозволяє вибрати один або кілька елементів. Дивитися :ref:`SelectMode<enum_ItemList_SelectMode>` константи.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_text_overrun_behavior:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` :ref:`🔗<class_ItemList_property_text_overrun_behavior>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ )
|
||
- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ )
|
||
|
||
Поведінка відсікання, коли текст виходить за межі прямокутника, що обмежує елемент.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_tile_scroll_hint:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **tile_scroll_hint** = ``false`` :ref:`🔗<class_ItemList_property_tile_scroll_hint>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tile_scroll_hint**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_scroll_hint_tiled**\ (\ )
|
||
|
||
If ``true``, the scroll hint texture will be tiled instead of stretched. See :ref:`scroll_hint_mode<class_ItemList_property_scroll_hint_mode>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_property_wraparound_items:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **wraparound_items** = ``true`` :ref:`🔗<class_ItemList_property_wraparound_items>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_wraparound_items**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **has_wraparound_items**\ (\ )
|
||
|
||
Якщо ``true``, елемент керування автоматично перемістить елементи в новий рядок відповідно до його вмісту. Перегляньте також :ref:`HFlowContainer<class_HFlowContainer>` для цієї поведінки.
|
||
|
||
Якщо ``false``, елемент керування додасть горизонтальну смугу прокручування, щоб усі елементи були видимими.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_ItemList_method_add_icon_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **add_icon_item**\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_add_icon_item>`
|
||
|
||
Додає елемент до списку елементів без тексту, тільки з іконкою. Повертає позицію доданого елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_add_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **add_item**\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_add_item>`
|
||
|
||
Додає елемент до списку елементів із вказаним текстом. Повертає індекс доданого елемента.
|
||
|
||
Укажіть ``icon`` або використовуйте ``null`` як ``icon`` для елемента списку без піктограми.
|
||
|
||
Якщо ``selectable`` має значення ``true``, елемент списку можна вибрати.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_clear:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear**\ (\ ) :ref:`🔗<class_ItemList_method_clear>`
|
||
|
||
Видаляє всі елементи зі списку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_deselect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **deselect**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_deselect>`
|
||
|
||
Упевнюється, що елемент, пов'язаний з зазначеним індексом, не буде обрано.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_deselect_all:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **deselect_all**\ (\ ) :ref:`🔗<class_ItemList_method_deselect_all>`
|
||
|
||
Забезпечує, що не обрано жодного елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_ensure_current_is_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **ensure_current_is_visible**\ (\ ) :ref:`🔗<class_ItemList_method_ensure_current_is_visible>`
|
||
|
||
Забезпечити поточний вибір видно, скоригуючи позицію прокрутки в міру необхідності.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_force_update_list_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **force_update_list_size**\ (\ ) :ref:`🔗<class_ItemList_method_force_update_list_size>`
|
||
|
||
Сили оновлення розміру списку на основі його елементів. Це відбувається автоматично, коли будь-який розмір елементів, або інші відповідні параметри, такі як :ref:`auto_height<class_ItemList_property_auto_height>`, зміна. Метод може використовуватися для запуску оновлення на наступний прохід.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_h_scroll_bar:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar**\ (\ ) :ref:`🔗<class_ItemList_method_get_h_scroll_bar>`
|
||
|
||
Повертає горизонтальну смугу прокручування.
|
||
|
||
\ **Попередження:** Це обов’язковий внутрішній вузол, його видалення та звільнення може призвести до збою. Якщо ви бажаєте приховати його чи будь-який із його дочірніх елементів, скористайтеся властивістю :ref:`CanvasItem.visible<class_CanvasItem_property_visible>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_ItemList_method_get_item_at_position>`
|
||
|
||
Повертає індекс елемента на даній ``position``.
|
||
|
||
Коли в тій точці немає елемента, -1 буде повернено, якщо ``exact`` ``true``, а інакше буде повернений найближчий індекс.
|
||
|
||
\ **Примітка:** Повернуте значення ненадійне, якщо називається відразу після змін до **ItemList**, перш ніж він перемальовується в наступному кадрі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_auto_translate_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_item_auto_translate_mode**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_auto_translate_mode>`
|
||
|
||
Повертає режим автоматичного перекладу елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_bg_color>`
|
||
|
||
Повертає користувацький фоновий колір виробу, зазначеного індексом ``idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_custom_fg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_fg_color>`
|
||
|
||
Повертає користувацький форвардний колір виробу, зазначеного індексом ``idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon>`
|
||
|
||
Повернення іконки, пов'язаної з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_icon_modulate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Color<class_Color>` **get_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_modulate>`
|
||
|
||
Повертає іконку :ref:`Color<class_Color>` модулюючий елемент у зазначеному індексі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_icon_region:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_item_icon_region**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_region>`
|
||
|
||
Повернення краю іконки елемента використовується. Вся ікона буде використовуватися, якщо регіон не має місця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_item_language**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_language>`
|
||
|
||
Повертає код мови тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_item_metadata**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_metadata>`
|
||
|
||
Повертає значення метаданих вказаного індексу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_item_rect**\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_ItemList_method_get_item_rect>`
|
||
|
||
Повертає позицію та розмір пункту з вказаним індексом, в координаційній системі вершини **ItemList**. Якщо ``expand`` є ``true`` останнього стовпчика розширюється, щоб заповнити решту рядка.
|
||
|
||
\ **Примітка:** Повернуте значення ненадійне, якщо називається правою після зміни **ItemList**, перш ніж він почервоний в наступному кадрі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_item_text**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text>`
|
||
|
||
Повернення тексту, пов'язаного з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_text_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text_direction>`
|
||
|
||
Повертає напрямок написання тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_item_tooltip:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_item_tooltip**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_tooltip>`
|
||
|
||
Повертає на підказку, пов'язаний з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_selected_items:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_selected_items**\ (\ ) :ref:`🔗<class_ItemList_method_get_selected_items>`
|
||
|
||
Повертає масив з індексами вибраних елементів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_get_v_scroll_bar:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_ItemList_method_get_v_scroll_bar>`
|
||
|
||
Повертає вертикальну прокрутку.
|
||
|
||
\ **Попередження:** Це необхідний внутрішній вузол, видаляючи і звільняючи його може призвести до аварії. Якщо ви хочете приховати його або будь-який з своїх дітей, скористайтеся їх :ref:`CanvasItem.pic<class_CanvasItem_property_pic>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_is_anything_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_anything_selected**\ (\ ) :ref:`🔗<class_ItemList_method_is_anything_selected>`
|
||
|
||
Повертає ``true``, якщо вибрано один або кілька елементів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_is_item_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_item_disabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_disabled>`
|
||
|
||
Повертає ``true``, якщо елемент на зазначеній позиції вимкнено.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_is_item_icon_transposed:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_icon_transposed>`
|
||
|
||
Повертаємо ``true``, якщо значок елемента буде намальовано, тобто X і Y знімаються.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_is_item_selectable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_item_selectable**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_selectable>`
|
||
|
||
Повертає ``true``, якщо пункт у зазначеному індексі вибрано.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_is_item_tooltip_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_tooltip_enabled>`
|
||
|
||
Повертає ``true``, якщо увімкнено інструмент для вказаного індексу пункту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_is_selected:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_selected**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_selected>`
|
||
|
||
Повертає ``true``, якщо елемент в зазначеній позиції наразі вибрано.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_move_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **move_item**\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_move_item>`
|
||
|
||
Перемістити пункт з індексу ``пара від_idx`` до ``to_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_remove_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_item**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_remove_item>`
|
||
|
||
Видалити пункт, зазначений індексом ``idx`` з списку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_select:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **select**\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_select>`
|
||
|
||
Виберіть пункт в зазначеному індексі.
|
||
|
||
\ **Примітка:** Цей метод не викликає сигналу вибору елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_auto_translate_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_auto_translate_mode**\ (\ idx\: :ref:`int<class_int>`, mode\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) :ref:`🔗<class_ItemList_method_set_item_auto_translate_mode>`
|
||
|
||
Встановлює режим автоматичного перекладу елемента, пов’язаного з указаним індексом.
|
||
|
||
Елементи за замовчуванням використовують :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>`, який використовує той самий режим автоматичного перекладу, що й сам **ItemList**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_custom_bg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_custom_bg_color>`
|
||
|
||
Встановлює фоновий колір виробу, зазначеного індексом ``idx`` до вказаного :ref:`Color<class_Color>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_custom_fg_color:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_custom_fg_color>`
|
||
|
||
Встановлює передовий колір виробу, зазначеного індексом ``idx`` до вказаного :ref:`Color<class_Color>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_disabled**\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_disabled>`
|
||
|
||
Вимкнення (або дозволяє) елементу в зазначеному індексі.
|
||
|
||
Вимкнені елементи не можна вибрати і не запускати сигнали активації (при подвійному затисканні або натисканні :kbd:`Enter`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_icon**\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon>`
|
||
|
||
Набори (або замінює) іконки :ref:`Texture2D<class_Texture2D>`, пов'язані з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_icon_modulate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_modulate>`
|
||
|
||
Встановлює модуляцію :ref:`Color<class_Color>` пункту, пов'язаної з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_icon_region:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_icon_region**\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_region>`
|
||
|
||
Налаштовує область ікони елемента. Вся ікона буде використовуватися, якщо регіон не має місця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_icon_transposed:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_transposed>`
|
||
|
||
Встановлює, чи буде показано значок елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_language**\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_language>`
|
||
|
||
Sets the language code of the text for the item at the given index to ``language``. This is used for line-breaking and text shaping algorithms. If ``language`` is empty, the current locale is used.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_metadata**\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ItemList_method_set_item_metadata>`
|
||
|
||
Встановлює значення (з будь-якого типу) для зберігання з пунктом, пов'язаним з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_selectable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_selectable**\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_selectable>`
|
||
|
||
Дозволяє або заборонити вибір виробу, пов'язаних з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_text**\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_text>`
|
||
|
||
Встановлює текст елемента, пов'язаний з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_text_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_text_direction**\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_ItemList_method_set_item_text_direction>`
|
||
|
||
Встановлює напрямок написання тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_tooltip:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_tooltip**\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip>`
|
||
|
||
Налаштовує натиснення інструменту для предмету, пов'язаного з вказаним індексом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_set_item_tooltip_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip_enabled>`
|
||
|
||
Налаштовує, чи включений інструмент для індексу вказаного пункту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_method_sort_items_by_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **sort_items_by_text**\ (\ ) :ref:`🔗<class_ItemList_method_sort_items_by_text>`
|
||
|
||
Сортувати за текстом.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи тематичної нерухомості
|
||
--------------------------------------------------------
|
||
|
||
.. _class_ItemList_theme_color_font_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` :ref:`🔗<class_ItemList_theme_color_font_color>`
|
||
|
||
Текст за замовчуванням :ref:`Color<class_Color>` пункту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_color_font_hovered_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_color>`
|
||
|
||
Текст :ref:`Color<class_Color>` використовується, коли елемент передається і не вибрано ще.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_color_font_hovered_selected_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_hovered_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_selected_color>`
|
||
|
||
:ref:`Color<class_Color>` тексту, що використовується, коли елемент наведено та вибрано.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_color_font_outline_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ItemList_theme_color_font_outline_color>`
|
||
|
||
Вміст текстового контуру виробу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_color_font_selected_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_selected_color>`
|
||
|
||
:ref:`Color<class_Color>` тексту, що використовується, коли елемент вибрано, але не наведено.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_color_guide_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_ItemList_theme_color_guide_color>`
|
||
|
||
``Колор`` дирекції. Дирекція - лінія, що складається між кожним рядом предметів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_constant_h_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_h_separation>`
|
||
|
||
Горизонтальна чистка між предметами.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_constant_icon_margin:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **icon_margin** = ``4`` :ref:`🔗<class_ItemList_theme_constant_icon_margin>`
|
||
|
||
Спірування іконки елемента та тексту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_constant_line_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **line_separation** = ``2`` :ref:`🔗<class_ItemList_theme_constant_line_separation>`
|
||
|
||
Вертикальне обмотування між кожним рядком тексту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_constant_outline_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_ItemList_theme_constant_outline_size>`
|
||
|
||
Розмір контуру пункту.
|
||
|
||
\ **Примітка:** Якщо за допомогою шрифту :ref:`FontFile.multiканал_signed_distance_field<class_FontFile_property_multiканал_signed_distance_field>` ввімкнено, його :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` необхідно встановити принаймні *twice* значення :ref:`index_size<class_ItemList_theme_item_index_size>` для позначення, що дає змогу виглядати правильно. В іншому випадку контур може з'явитися, щоб зрізати раніше, ніж призначений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_constant_v_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_v_separation>`
|
||
|
||
Вертикальне обмотування між предметами.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_font_font:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Font<class_Font>` **font** :ref:`🔗<class_ItemList_theme_font_font>`
|
||
|
||
:ref:`Font<class_Font>` тексту елемента.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_font_size_font_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **font_size** :ref:`🔗<class_ItemList_theme_font_size_font_size>`
|
||
|
||
Розмір шрифту тексту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_icon_scroll_hint:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **scroll_hint** :ref:`🔗<class_ItemList_theme_icon_scroll_hint>`
|
||
|
||
The indicator that will be shown when the content can still be scrolled. See :ref:`scroll_hint_mode<class_ItemList_property_scroll_hint_mode>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_cursor:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_ItemList_theme_style_cursor>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` використовується для курсора, коли фокусується **ItemList**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_cursor_unfocused:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_ItemList_theme_style_cursor_unfocused>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` використовується для курсора, коли **ItemList** не фокусується.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_ItemList_theme_style_focus>`
|
||
|
||
The focused style for the **ItemList**, drawn on top of everything.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_hovered:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered** :ref:`🔗<class_ItemList_theme_style_hovered>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` для обхвату, але не вибрані елементи.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_hovered_selected:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered_selected** :ref:`🔗<class_ItemList_theme_style_hovered_selected>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` для наведених і вибраних елементів, використовується, коли **ItemList** не в фокусі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_hovered_selected_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **hovered_selected_focus** :ref:`🔗<class_ItemList_theme_style_hovered_selected_focus>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` для наведених і вибраних елементів, що використовується під час фокусування **ItemList**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_panel:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_ItemList_theme_style_panel>`
|
||
|
||
Стиль фону для **ItemList**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_selected:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_ItemList_theme_style_selected>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` для вибраних елементів, які використовуються при **ItemList** не фокусуються.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_ItemList_theme_style_selected_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_ItemList_theme_style_selected_focus>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` для вибраних елементів, які використовуються при фокусі **ItemList**.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|