mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
580 lines
27 KiB
ReStructuredText
580 lines
27 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_SplitContainer:
|
|
|
|
SplitContainer
|
|
==============
|
|
|
|
**繼承:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**被繼承:** :ref:`HSplitContainer<class_HSplitContainer>`, :ref:`VSplitContainer<class_VSplitContainer>`
|
|
|
|
將兩個子控制項垂直或水平分隔的容器,提供了用於調整分隔比例的抓取器。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
說明
|
|
----
|
|
|
|
僅接受兩個子控制項的容器,會將它們垂直或水平排列,在中間建立一個分隔條。分隔條可以拖拽,從而改變兩個控制項的大小關係。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
教學
|
|
----
|
|
|
|
- :doc:`使用容器 <../tutorials/ui/gui_containers>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
屬性
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`collapsed<class_SplitContainer_property_collapsed>` | ``false`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`drag_area_highlight_in_editor<class_SplitContainer_property_drag_area_highlight_in_editor>` | ``false`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`int<class_int>` | :ref:`drag_area_margin_begin<class_SplitContainer_property_drag_area_margin_begin>` | ``0`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`int<class_int>` | :ref:`drag_area_margin_end<class_SplitContainer_property_drag_area_margin_end>` | ``0`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`int<class_int>` | :ref:`drag_area_offset<class_SplitContainer_property_drag_area_offset>` | ``0`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` | :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` | ``0`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`dragging_enabled<class_SplitContainer_property_dragging_enabled>` | ``true`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`int<class_int>` | :ref:`split_offset<class_SplitContainer_property_split_offset>` | ``0`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`touch_dragger_enabled<class_SplitContainer_property_touch_dragger_enabled>` | ``false`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`vertical<class_SplitContainer_property_vertical>` | ``false`` |
|
|
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------+---------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>`\ (\ ) |
|
|
+-------------------------------+---------------------------------------------------------------------------------------+
|
|
| :ref:`Control<class_Control>` | :ref:`get_drag_area_control<class_SplitContainer_method_get_drag_area_control>`\ (\ ) |
|
|
+-------------------------------+---------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
主題屬性
|
|
--------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`touch_dragger_color<class_SplitContainer_theme_color_touch_dragger_color>` | ``Color(1, 1, 1, 0.3)`` |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`touch_dragger_hover_color<class_SplitContainer_theme_color_touch_dragger_hover_color>` | ``Color(1, 1, 1, 0.6)`` |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`touch_dragger_pressed_color<class_SplitContainer_theme_color_touch_dragger_pressed_color>` | ``Color(1, 1, 1, 1)`` |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`int<class_int>` | :ref:`autohide<class_SplitContainer_theme_constant_autohide>` | ``1`` |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`int<class_int>` | :ref:`minimum_grab_thickness<class_SplitContainer_theme_constant_minimum_grab_thickness>` | ``6`` |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`int<class_int>` | :ref:`separation<class_SplitContainer_theme_constant_separation>` | ``12`` |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_SplitContainer_theme_icon_grabber>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`h_grabber<class_SplitContainer_theme_icon_h_grabber>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`h_touch_dragger<class_SplitContainer_theme_icon_h_touch_dragger>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`touch_dragger<class_SplitContainer_theme_icon_touch_dragger>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`v_grabber<class_SplitContainer_theme_icon_v_grabber>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`v_touch_dragger<class_SplitContainer_theme_icon_v_touch_dragger>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`split_bar_background<class_SplitContainer_theme_style_split_bar_background>` | |
|
|
+-----------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
訊號
|
|
----
|
|
|
|
.. _class_SplitContainer_signal_drag_ended:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**drag_ended**\ (\ ) :ref:`🔗<class_SplitContainer_signal_drag_ended>`
|
|
|
|
Emitted when the user ends dragging.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_signal_drag_started:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**drag_started**\ (\ ) :ref:`🔗<class_SplitContainer_signal_drag_started>`
|
|
|
|
Emitted when the user starts dragging.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_signal_dragged:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**dragged**\ (\ offset\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SplitContainer_signal_dragged>`
|
|
|
|
當使用者拖動拖動器時發出。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
列舉
|
|
----
|
|
|
|
.. _enum_SplitContainer_DraggerVisibility:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **DraggerVisibility**: :ref:`🔗<enum_SplitContainer_DraggerVisibility>`
|
|
|
|
.. _class_SplitContainer_constant_DRAGGER_VISIBLE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **DRAGGER_VISIBLE** = ``0``
|
|
|
|
The split dragger icon is always visible when :ref:`autohide<class_SplitContainer_theme_constant_autohide>` is ``false``, otherwise visible only when the cursor hovers it.
|
|
|
|
The size of the grabber icon determines the minimum :ref:`separation<class_SplitContainer_theme_constant_separation>`.
|
|
|
|
The dragger icon is automatically hidden if the length of the grabber icon is longer than the split bar.
|
|
|
|
.. _class_SplitContainer_constant_DRAGGER_HIDDEN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **DRAGGER_HIDDEN** = ``1``
|
|
|
|
The split dragger icon is never visible regardless of the value of :ref:`autohide<class_SplitContainer_theme_constant_autohide>`.
|
|
|
|
The size of the grabber icon determines the minimum :ref:`separation<class_SplitContainer_theme_constant_separation>`.
|
|
|
|
.. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **DRAGGER_HIDDEN_COLLAPSED** = ``2``
|
|
|
|
The split dragger icon is not visible, and the split bar is collapsed to zero thickness.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
屬性說明
|
|
--------
|
|
|
|
.. _class_SplitContainer_property_collapsed:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **collapsed** = ``false`` :ref:`🔗<class_SplitContainer_property_collapsed>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_collapsed**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_collapsed**\ (\ )
|
|
|
|
If ``true``, the dragger will be disabled and the children will be sized as if the :ref:`split_offset<class_SplitContainer_property_split_offset>` was ``0``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_drag_area_highlight_in_editor:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **drag_area_highlight_in_editor** = ``false`` :ref:`🔗<class_SplitContainer_property_drag_area_highlight_in_editor>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_drag_area_highlight_in_editor**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_drag_area_highlight_in_editor_enabled**\ (\ )
|
|
|
|
Highlights the drag area :ref:`Rect2<class_Rect2>` so you can see where it is during development. The drag area is gold if :ref:`dragging_enabled<class_SplitContainer_property_dragging_enabled>` is ``true``, and red if ``false``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_drag_area_margin_begin:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **drag_area_margin_begin** = ``0`` :ref:`🔗<class_SplitContainer_property_drag_area_margin_begin>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_drag_area_margin_begin**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_drag_area_margin_begin**\ (\ )
|
|
|
|
Reduces the size of the drag area and split bar :ref:`split_bar_background<class_SplitContainer_theme_style_split_bar_background>` at the beginning of the container.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_drag_area_margin_end:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **drag_area_margin_end** = ``0`` :ref:`🔗<class_SplitContainer_property_drag_area_margin_end>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_drag_area_margin_end**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_drag_area_margin_end**\ (\ )
|
|
|
|
Reduces the size of the drag area and split bar :ref:`split_bar_background<class_SplitContainer_theme_style_split_bar_background>` at the end of the container.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_drag_area_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **drag_area_offset** = ``0`` :ref:`🔗<class_SplitContainer_property_drag_area_offset>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_drag_area_offset**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_drag_area_offset**\ (\ )
|
|
|
|
Shifts the drag area in the axis of the container to prevent the drag area from overlapping the :ref:`ScrollBar<class_ScrollBar>` or other selectable :ref:`Control<class_Control>` of a child node.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_dragger_visibility:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility** = ``0`` :ref:`🔗<class_SplitContainer_property_dragger_visibility>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_dragger_visibility**\ (\ value\: :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>`\ )
|
|
- :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **get_dragger_visibility**\ (\ )
|
|
|
|
Determines the dragger's visibility. This property does not determine whether dragging is enabled or not. Use :ref:`dragging_enabled<class_SplitContainer_property_dragging_enabled>` for that.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_dragging_enabled:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **dragging_enabled** = ``true`` :ref:`🔗<class_SplitContainer_property_dragging_enabled>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_dragging_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_dragging_enabled**\ (\ )
|
|
|
|
Enables or disables split dragging.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_split_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **split_offset** = ``0`` :ref:`🔗<class_SplitContainer_property_split_offset>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_split_offset**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_split_offset**\ (\ )
|
|
|
|
兩個 :ref:`Control<class_Control>` 之間拆分的初始偏移量,\ ``0`` 位於第一個 :ref:`Control<class_Control>` 的末尾。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_touch_dragger_enabled:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **touch_dragger_enabled** = ``false`` :ref:`🔗<class_SplitContainer_property_touch_dragger_enabled>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_touch_dragger_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_touch_dragger_enabled**\ (\ )
|
|
|
|
If ``true``, a touch-friendly drag handle will be enabled for better usability on smaller screens. Unlike the standard grabber, this drag handle overlaps the **SplitContainer**'s children and does not affect their minimum separation. The standard grabber will no longer be drawn when this option is enabled.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_property_vertical:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **vertical** = ``false`` :ref:`🔗<class_SplitContainer_property_vertical>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_vertical**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_vertical**\ (\ )
|
|
|
|
如果為 ``true``\ ,則該 **SplitContainer** 會垂直排列其子代,而不是水平排列。
|
|
|
|
在使用 :ref:`HSplitContainer<class_HSplitContainer>` 和 :ref:`VSplitContainer<class_VSplitContainer>` 時無法改變。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法說明
|
|
--------
|
|
|
|
.. _class_SplitContainer_method_clamp_split_offset:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clamp_split_offset**\ (\ ) :ref:`🔗<class_SplitContainer_method_clamp_split_offset>`
|
|
|
|
限制 :ref:`split_offset<class_SplitContainer_property_split_offset>` 值不超出目前可能的最小值和最大值。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_method_get_drag_area_control:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Control<class_Control>` **get_drag_area_control**\ (\ ) :ref:`🔗<class_SplitContainer_method_get_drag_area_control>`
|
|
|
|
Returns the drag area :ref:`Control<class_Control>`. For example, you can move a pre-configured button into the drag area :ref:`Control<class_Control>` so that it rides along with the split bar. Try setting the :ref:`Button<class_Button>` anchors to ``center`` prior to the ``reparent()`` call.
|
|
|
|
::
|
|
|
|
$BarnacleButton.reparent($SplitContainer.get_drag_area_control())
|
|
|
|
\ **Note:** The drag area :ref:`Control<class_Control>` is drawn over the **SplitContainer**'s children, so :ref:`CanvasItem<class_CanvasItem>` draw objects called from the :ref:`Control<class_Control>` and children added to the :ref:`Control<class_Control>` will also appear over the **SplitContainer**'s children. Try setting :ref:`Control.mouse_filter<class_Control_property_mouse_filter>` of custom children to :ref:`Control.MOUSE_FILTER_IGNORE<class_Control_constant_MOUSE_FILTER_IGNORE>` to prevent blocking the mouse from dragging if desired.
|
|
|
|
\ **Warning:** This is a required internal node, removing and freeing it may cause a crash.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
主題屬性說明
|
|
------------
|
|
|
|
.. _class_SplitContainer_theme_color_touch_dragger_color:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Color<class_Color>` **touch_dragger_color** = ``Color(1, 1, 1, 0.3)`` :ref:`🔗<class_SplitContainer_theme_color_touch_dragger_color>`
|
|
|
|
The color of the touch dragger.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_color_touch_dragger_hover_color:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Color<class_Color>` **touch_dragger_hover_color** = ``Color(1, 1, 1, 0.6)`` :ref:`🔗<class_SplitContainer_theme_color_touch_dragger_hover_color>`
|
|
|
|
The color of the touch dragger when hovered.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_color_touch_dragger_pressed_color:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Color<class_Color>` **touch_dragger_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_SplitContainer_theme_color_touch_dragger_pressed_color>`
|
|
|
|
The color of the touch dragger when pressed.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_constant_autohide:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`int<class_int>` **autohide** = ``1`` :ref:`🔗<class_SplitContainer_theme_constant_autohide>`
|
|
|
|
Boolean value. If ``1`` (``true``), the grabber will hide automatically when it isn't under the cursor. If ``0`` (``false``), it's always visible. The :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` must be :ref:`DRAGGER_VISIBLE<class_SplitContainer_constant_DRAGGER_VISIBLE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_constant_minimum_grab_thickness:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`int<class_int>` **minimum_grab_thickness** = ``6`` :ref:`🔗<class_SplitContainer_theme_constant_minimum_grab_thickness>`
|
|
|
|
The minimum thickness of the area users can click on to grab the split bar. This ensures that the split bar can still be dragged if :ref:`separation<class_SplitContainer_theme_constant_separation>` or :ref:`h_grabber<class_SplitContainer_theme_icon_h_grabber>` / :ref:`v_grabber<class_SplitContainer_theme_icon_v_grabber>`'s size is too narrow to easily select.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_constant_separation:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`int<class_int>` **separation** = ``12`` :ref:`🔗<class_SplitContainer_theme_constant_separation>`
|
|
|
|
The split bar thickness, i.e., the gap between the two children of the container. This is overridden by the size of the grabber icon if :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` is set to :ref:`DRAGGER_VISIBLE<class_SplitContainer_constant_DRAGGER_VISIBLE>`, or :ref:`DRAGGER_HIDDEN<class_SplitContainer_constant_DRAGGER_HIDDEN>`, and :ref:`separation<class_SplitContainer_theme_constant_separation>` is smaller than the size of the grabber icon in the same axis.
|
|
|
|
\ **Note:** To obtain :ref:`separation<class_SplitContainer_theme_constant_separation>` values less than the size of the grabber icon, for example a ``1 px`` hairline, set :ref:`h_grabber<class_SplitContainer_theme_icon_h_grabber>` or :ref:`v_grabber<class_SplitContainer_theme_icon_v_grabber>` to a new :ref:`ImageTexture<class_ImageTexture>`, which effectively sets the grabber icon size to ``0 px``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_icon_grabber:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **grabber** :ref:`🔗<class_SplitContainer_theme_icon_grabber>`
|
|
|
|
The icon used for the grabber drawn in the middle area. This is only used in :ref:`HSplitContainer<class_HSplitContainer>` and :ref:`VSplitContainer<class_VSplitContainer>`. For **SplitContainer**, see :ref:`h_grabber<class_SplitContainer_theme_icon_h_grabber>` and :ref:`v_grabber<class_SplitContainer_theme_icon_v_grabber>` instead.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_icon_h_grabber:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **h_grabber** :ref:`🔗<class_SplitContainer_theme_icon_h_grabber>`
|
|
|
|
:ref:`vertical<class_SplitContainer_property_vertical>` 為 ``false`` 時繪製在中間區域的抓取器圖示。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_icon_h_touch_dragger:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **h_touch_dragger** :ref:`🔗<class_SplitContainer_theme_icon_h_touch_dragger>`
|
|
|
|
The icon used for the drag handle when :ref:`touch_dragger_enabled<class_SplitContainer_property_touch_dragger_enabled>` is ``true`` and :ref:`vertical<class_SplitContainer_property_vertical>` is ``false``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_icon_touch_dragger:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **touch_dragger** :ref:`🔗<class_SplitContainer_theme_icon_touch_dragger>`
|
|
|
|
The icon used for the drag handle when :ref:`touch_dragger_enabled<class_SplitContainer_property_touch_dragger_enabled>` is ``true``. This is only used in :ref:`HSplitContainer<class_HSplitContainer>` and :ref:`VSplitContainer<class_VSplitContainer>`. For **SplitContainer**, see :ref:`h_touch_dragger<class_SplitContainer_theme_icon_h_touch_dragger>` and :ref:`v_touch_dragger<class_SplitContainer_theme_icon_v_touch_dragger>` instead.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_icon_v_grabber:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **v_grabber** :ref:`🔗<class_SplitContainer_theme_icon_v_grabber>`
|
|
|
|
:ref:`vertical<class_SplitContainer_property_vertical>` 為 ``true`` 時繪製在中間區域的抓取器圖示。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_icon_v_touch_dragger:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **v_touch_dragger** :ref:`🔗<class_SplitContainer_theme_icon_v_touch_dragger>`
|
|
|
|
The icon used for the drag handle when :ref:`touch_dragger_enabled<class_SplitContainer_property_touch_dragger_enabled>` is ``true`` and :ref:`vertical<class_SplitContainer_property_vertical>` is ``true``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_SplitContainer_theme_style_split_bar_background:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **split_bar_background** :ref:`🔗<class_SplitContainer_theme_style_split_bar_background>`
|
|
|
|
Determines the background of the split bar if its thickness is greater than zero.
|
|
|
|
.. |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 (無回傳值。)`
|