|
@@ -64,85 +64,87 @@ Properties
|
|
|
.. table::
|
|
|
:widths: auto
|
|
|
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`anchor_bottom<class_Control_property_anchor_bottom>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`anchor_left<class_Control_property_anchor_left>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`anchor_right<class_Control_property_anchor_right>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`anchor_top<class_Control_property_anchor_top>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`auto_translate<class_Control_property_auto_translate>` | ``true`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`clip_contents<class_Control_property_clip_contents>` | ``false`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`custom_minimum_size<class_Control_property_custom_minimum_size>` | ``Vector2(0, 0)`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`focus_mode<class_Control_property_focus_mode>` | ``0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_bottom<class_Control_property_focus_neighbor_bottom>` | ``NodePath("")`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_left<class_Control_property_focus_neighbor_left>` | ``NodePath("")`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_right<class_Control_property_focus_neighbor_right>` | ``NodePath("")`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_top<class_Control_property_focus_neighbor_top>` | ``NodePath("")`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`NodePath<class_NodePath>` | :ref:`focus_next<class_Control_property_focus_next>` | ``NodePath("")`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`NodePath<class_NodePath>` | :ref:`focus_previous<class_Control_property_focus_previous>` | ``NodePath("")`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_Control_property_global_position>` | |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`GrowDirection<enum_Control_GrowDirection>` | :ref:`grow_horizontal<class_Control_property_grow_horizontal>` | ``1`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`GrowDirection<enum_Control_GrowDirection>` | :ref:`grow_vertical<class_Control_property_grow_vertical>` | ``1`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`LayoutDirection<enum_Control_LayoutDirection>` | :ref:`layout_direction<class_Control_property_layout_direction>` | ``0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`localize_numeral_system<class_Control_property_localize_numeral_system>` | ``true`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`CursorShape<enum_Control_CursorShape>` | :ref:`mouse_default_cursor_shape<class_Control_property_mouse_default_cursor_shape>` | ``0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`MouseFilter<enum_Control_MouseFilter>` | :ref:`mouse_filter<class_Control_property_mouse_filter>` | ``0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`mouse_force_pass_scroll_events<class_Control_property_mouse_force_pass_scroll_events>` | ``true`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`offset_bottom<class_Control_property_offset_bottom>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`offset_left<class_Control_property_offset_left>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`offset_right<class_Control_property_offset_right>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`offset_top<class_Control_property_offset_top>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`pivot_offset<class_Control_property_pivot_offset>` | ``Vector2(0, 0)`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`position<class_Control_property_position>` | ``Vector2(0, 0)`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`rotation<class_Control_property_rotation>` | ``0.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`rotation_degrees<class_Control_property_rotation_degrees>` | |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`scale<class_Control_property_scale>` | ``Vector2(1, 1)`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Node<class_Node>` | :ref:`shortcut_context<class_Control_property_shortcut_context>` | |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`size<class_Control_property_size>` | ``Vector2(0, 0)`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | :ref:`size_flags_horizontal<class_Control_property_size_flags_horizontal>` | ``1`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>` | ``1.0`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | :ref:`size_flags_vertical<class_Control_property_size_flags_vertical>` | ``1`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`Theme<class_Theme>` | :ref:`theme<class_Control_property_theme>` | |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`StringName<class_StringName>` | :ref:`theme_type_variation<class_Control_property_theme_type_variation>` | ``&""`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
- | :ref:`String<class_String>` | :ref:`tooltip_text<class_Control_property_tooltip_text>` | ``""`` |
|
|
|
- +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`anchor_bottom<class_Control_property_anchor_bottom>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`anchor_left<class_Control_property_anchor_left>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`anchor_right<class_Control_property_anchor_right>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`anchor_top<class_Control_property_anchor_top>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`auto_translate<class_Control_property_auto_translate>` | ``true`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`clip_contents<class_Control_property_clip_contents>` | ``false`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`custom_minimum_size<class_Control_property_custom_minimum_size>` | ``Vector2(0, 0)`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`focus_mode<class_Control_property_focus_mode>` | ``0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_bottom<class_Control_property_focus_neighbor_bottom>` | ``NodePath("")`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_left<class_Control_property_focus_neighbor_left>` | ``NodePath("")`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_right<class_Control_property_focus_neighbor_right>` | ``NodePath("")`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`NodePath<class_NodePath>` | :ref:`focus_neighbor_top<class_Control_property_focus_neighbor_top>` | ``NodePath("")`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`NodePath<class_NodePath>` | :ref:`focus_next<class_Control_property_focus_next>` | ``NodePath("")`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`NodePath<class_NodePath>` | :ref:`focus_previous<class_Control_property_focus_previous>` | ``NodePath("")`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_Control_property_global_position>` | |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`GrowDirection<enum_Control_GrowDirection>` | :ref:`grow_horizontal<class_Control_property_grow_horizontal>` | ``1`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`GrowDirection<enum_Control_GrowDirection>` | :ref:`grow_vertical<class_Control_property_grow_vertical>` | ``1`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`LayoutDirection<enum_Control_LayoutDirection>` | :ref:`layout_direction<class_Control_property_layout_direction>` | ``0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`localize_numeral_system<class_Control_property_localize_numeral_system>` | ``true`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`CursorShape<enum_Control_CursorShape>` | :ref:`mouse_default_cursor_shape<class_Control_property_mouse_default_cursor_shape>` | ``0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`MouseFilter<enum_Control_MouseFilter>` | :ref:`mouse_filter<class_Control_property_mouse_filter>` | ``0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`mouse_force_pass_scroll_events<class_Control_property_mouse_force_pass_scroll_events>` | ``true`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`offset_bottom<class_Control_property_offset_bottom>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`offset_left<class_Control_property_offset_left>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`offset_right<class_Control_property_offset_right>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`offset_top<class_Control_property_offset_top>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` | physics_interpolation_mode | ``2`` (overrides :ref:`Node<class_Node_property_physics_interpolation_mode>`) |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`pivot_offset<class_Control_property_pivot_offset>` | ``Vector2(0, 0)`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`position<class_Control_property_position>` | ``Vector2(0, 0)`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`rotation<class_Control_property_rotation>` | ``0.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`rotation_degrees<class_Control_property_rotation_degrees>` | |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`scale<class_Control_property_scale>` | ``Vector2(1, 1)`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Node<class_Node>` | :ref:`shortcut_context<class_Control_property_shortcut_context>` | |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`size<class_Control_property_size>` | ``Vector2(0, 0)`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | :ref:`size_flags_horizontal<class_Control_property_size_flags_horizontal>` | ``1`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>` | ``1.0`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | :ref:`size_flags_vertical<class_Control_property_size_flags_vertical>` | ``1`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Theme<class_Theme>` | :ref:`theme<class_Control_property_theme>` | |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`StringName<class_StringName>` | :ref:`theme_type_variation<class_Control_property_theme_type_variation>` | ``&""`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
+ | :ref:`String<class_String>` | :ref:`tooltip_text<class_Control_property_tooltip_text>` | ``""`` |
|
|
|
+ +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
|
|
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
|
@@ -1159,6 +1161,16 @@ Sent when the node needs to refresh its theme items. This happens in one of the
|
|
|
|
|
|
\ **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
|
|
|
|
|
|
+\ **Note:** This notification is received alongside :ref:`Node.NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`Node.is_node_ready<class_Node_method_is_node_ready>`.
|
|
|
+
|
|
|
+::
|
|
|
+
|
|
|
+ func _notification(what):
|
|
|
+ if what == NOTIFICATION_THEME_CHANGED:
|
|
|
+ if not is_node_ready():
|
|
|
+ await ready # Wait until ready signal.
|
|
|
+ $Label.add_theme_color_override("font_color", Color.YELLOW)
|
|
|
+
|
|
|
.. _class_Control_constant_NOTIFICATION_SCROLL_BEGIN:
|
|
|
|
|
|
.. rst-class:: classref-constant
|