classref: Sync with current master branch (46a568e0a)

This commit is contained in:
Rémi Verschelde
2022-08-31 15:18:54 +02:00
parent b08b95d4f5
commit 465dd176b6
378 changed files with 17124 additions and 13692 deletions

View File

@@ -26,17 +26,19 @@ See also :ref:`BaseButton<class_BaseButton>` which contains common properties an
Properties
----------
+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`ActionMode<enum_BaseButton_ActionMode>` | action_mode | ``0`` (overrides :ref:`BaseButton<class_BaseButton_property_action_mode>`) |
+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | alignment | ``0`` (overrides :ref:`Button<class_Button_property_alignment>`) |
+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`item_count<class_OptionButton_property_item_count>` | ``0`` |
+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`selected<class_OptionButton_property_selected>` | ``-1`` |
+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | toggle_mode | ``true`` (overrides :ref:`BaseButton<class_BaseButton_property_toggle_mode>`) |
+-------------------------------------------------------------------+-----------------------------------------------------------+-------------------------------------------------------------------------------+
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`ActionMode<enum_BaseButton_ActionMode>` | action_mode | ``0`` (overrides :ref:`BaseButton<class_BaseButton_property_action_mode>`) |
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | alignment | ``0`` (overrides :ref:`Button<class_Button_property_alignment>`) |
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`fit_to_longest_item<class_OptionButton_property_fit_to_longest_item>` | ``true`` |
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`item_count<class_OptionButton_property_item_count>` | ``0`` |
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`selected<class_OptionButton_property_selected>` | ``-1`` |
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | toggle_mode | ``true`` (overrides :ref:`BaseButton<class_BaseButton_property_toggle_mode>`) |
+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+
Methods
-------
@@ -96,49 +98,53 @@ Methods
Theme Properties
----------------
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_color<class_OptionButton_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_OptionButton_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_focus_color<class_OptionButton_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_hover_color<class_OptionButton_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_OptionButton_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_OptionButton_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`arrow_margin<class_OptionButton_theme_constant_arrow_margin>` | ``4`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`h_separation<class_OptionButton_theme_constant_h_separation>` | ``2`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`outline_size<class_OptionButton_theme_constant_outline_size>` | ``0`` |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Font<class_Font>` | :ref:`font<class_OptionButton_theme_font_font>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`font_size<class_OptionButton_theme_font_size_font_size>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_OptionButton_theme_icon_arrow>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_OptionButton_theme_style_disabled>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`disabled_mirrored<class_OptionButton_theme_style_disabled_mirrored>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_OptionButton_theme_style_focus>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_OptionButton_theme_style_hover>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`hover_mirrored<class_OptionButton_theme_style_hover_mirrored>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_OptionButton_theme_style_normal>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`normal_mirrored<class_OptionButton_theme_style_normal_mirrored>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_OptionButton_theme_style_pressed>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`pressed_mirrored<class_OptionButton_theme_style_pressed_mirrored>` | |
+-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_color<class_OptionButton_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_OptionButton_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_focus_color<class_OptionButton_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_hover_color<class_OptionButton_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_OptionButton_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_OptionButton_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_OptionButton_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`arrow_margin<class_OptionButton_theme_constant_arrow_margin>` | ``4`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`h_separation<class_OptionButton_theme_constant_h_separation>` | ``2`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`modulate_arrow<class_OptionButton_theme_constant_modulate_arrow>` | ``0`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`outline_size<class_OptionButton_theme_constant_outline_size>` | ``0`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Font<class_Font>` | :ref:`font<class_OptionButton_theme_font_font>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`font_size<class_OptionButton_theme_font_size_font_size>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_OptionButton_theme_icon_arrow>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_OptionButton_theme_style_disabled>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`disabled_mirrored<class_OptionButton_theme_style_disabled_mirrored>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_OptionButton_theme_style_focus>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_OptionButton_theme_style_hover>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`hover_mirrored<class_OptionButton_theme_style_hover_mirrored>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_OptionButton_theme_style_normal>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`normal_mirrored<class_OptionButton_theme_style_normal_mirrored>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_OptionButton_theme_style_pressed>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`pressed_mirrored<class_OptionButton_theme_style_pressed_mirrored>` | |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
Signals
-------
@@ -160,6 +166,24 @@ Emitted when the current item has been changed by the user. The index of the ite
Property Descriptions
---------------------
.. _class_OptionButton_property_fit_to_longest_item:
- :ref:`bool<class_bool>` **fit_to_longest_item**
+-----------+--------------------------------+
| *Default* | ``true`` |
+-----------+--------------------------------+
| *Setter* | set_fit_to_longest_item(value) |
+-----------+--------------------------------+
| *Getter* | is_fit_to_longest_item() |
+-----------+--------------------------------+
If ``true``, minimum size will be determined by the longest item's text, instead of the currently selected one's.
\ **Note:** For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items.
----
.. _class_OptionButton_property_item_count:
- :ref:`int<class_int>` **item_count**
@@ -440,6 +464,18 @@ Text :ref:`Color<class_Color>` used when the ``OptionButton`` is being hovered.
----
.. _class_OptionButton_theme_color_font_hover_pressed_color:
- :ref:`Color<class_Color>` **font_hover_pressed_color**
+-----------+-----------------------+
| *Default* | ``Color(1, 1, 1, 1)`` |
+-----------+-----------------------+
Text :ref:`Color<class_Color>` used when the ``OptionButton`` is being hovered and pressed.
----
.. _class_OptionButton_theme_color_font_outline_color:
- :ref:`Color<class_Color>` **font_outline_color**
@@ -484,7 +520,19 @@ The horizontal space between the arrow icon and the right edge of the button.
| *Default* | ``2`` |
+-----------+-------+
The horizontal space between ``OptionButton``'s icon and text.
The horizontal space between ``OptionButton``'s icon and text. Negative values will be treated as ``0`` when used.
----
.. _class_OptionButton_theme_constant_modulate_arrow:
- :ref:`int<class_int>` **modulate_arrow**
+-----------+-------+
| *Default* | ``0`` |
+-----------+-------+
If different than ``0``, the arrow icon will be modulated to the font color.
----