|
@@ -241,48 +241,64 @@ Signals
|
|
|
|
|
|
|
|
Emitted when the node gains keyboard focus.
|
|
Emitted when the node gains keyboard focus.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_focus_exited:
|
|
.. _class_Control_signal_focus_exited:
|
|
|
|
|
|
|
|
- **focus_exited** **(** **)**
|
|
- **focus_exited** **(** **)**
|
|
|
|
|
|
|
|
Emitted when the node loses keyboard focus.
|
|
Emitted when the node loses keyboard focus.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_gui_input:
|
|
.. _class_Control_signal_gui_input:
|
|
|
|
|
|
|
|
- **gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)**
|
|
- **gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)**
|
|
|
|
|
|
|
|
Emitted when the node receives an :ref:`InputEvent<class_InputEvent>`.
|
|
Emitted when the node receives an :ref:`InputEvent<class_InputEvent>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_minimum_size_changed:
|
|
.. _class_Control_signal_minimum_size_changed:
|
|
|
|
|
|
|
|
- **minimum_size_changed** **(** **)**
|
|
- **minimum_size_changed** **(** **)**
|
|
|
|
|
|
|
|
Emitted when the node's minimum size changes.
|
|
Emitted when the node's minimum size changes.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_modal_closed:
|
|
.. _class_Control_signal_modal_closed:
|
|
|
|
|
|
|
|
- **modal_closed** **(** **)**
|
|
- **modal_closed** **(** **)**
|
|
|
|
|
|
|
|
Emitted when a modal ``Control`` is closed. See :ref:`show_modal<class_Control_method_show_modal>`.
|
|
Emitted when a modal ``Control`` is closed. See :ref:`show_modal<class_Control_method_show_modal>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_mouse_entered:
|
|
.. _class_Control_signal_mouse_entered:
|
|
|
|
|
|
|
|
- **mouse_entered** **(** **)**
|
|
- **mouse_entered** **(** **)**
|
|
|
|
|
|
|
|
Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mouse_filter<class_Control_property_mouse_filter>` lets the event reach it.
|
|
Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mouse_filter<class_Control_property_mouse_filter>` lets the event reach it.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_mouse_exited:
|
|
.. _class_Control_signal_mouse_exited:
|
|
|
|
|
|
|
|
- **mouse_exited** **(** **)**
|
|
- **mouse_exited** **(** **)**
|
|
|
|
|
|
|
|
Emitted when the mouse leaves the control's ``Rect`` area, provided its :ref:`mouse_filter<class_Control_property_mouse_filter>` lets the event reach it.
|
|
Emitted when the mouse leaves the control's ``Rect`` area, provided its :ref:`mouse_filter<class_Control_property_mouse_filter>` lets the event reach it.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_resized:
|
|
.. _class_Control_signal_resized:
|
|
|
|
|
|
|
|
- **resized** **(** **)**
|
|
- **resized** **(** **)**
|
|
|
|
|
|
|
|
Emitted when the control changes size.
|
|
Emitted when the control changes size.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_signal_size_flags_changed:
|
|
.. _class_Control_signal_size_flags_changed:
|
|
|
|
|
|
|
|
- **size_flags_changed** **(** **)**
|
|
- **size_flags_changed** **(** **)**
|
|
@@ -308,6 +324,8 @@ enum **FocusMode**:
|
|
|
|
|
|
|
|
- **FOCUS_ALL** = **2** --- The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with :ref:`focus_mode<class_Control_property_focus_mode>`.
|
|
- **FOCUS_ALL** = **2** --- The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with :ref:`focus_mode<class_Control_property_focus_mode>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_CursorShape:
|
|
.. _enum_Control_CursorShape:
|
|
|
|
|
|
|
|
.. _class_Control_constant_CURSOR_ARROW:
|
|
.. _class_Control_constant_CURSOR_ARROW:
|
|
@@ -380,6 +398,8 @@ enum **CursorShape**:
|
|
|
|
|
|
|
|
- **CURSOR_HELP** = **16** --- Show the system's help mouse cursor when the user hovers the node, a question mark.
|
|
- **CURSOR_HELP** = **16** --- Show the system's help mouse cursor when the user hovers the node, a question mark.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_LayoutPreset:
|
|
.. _enum_Control_LayoutPreset:
|
|
|
|
|
|
|
|
.. _class_Control_constant_PRESET_TOP_LEFT:
|
|
.. _class_Control_constant_PRESET_TOP_LEFT:
|
|
@@ -448,6 +468,8 @@ enum **LayoutPreset**:
|
|
|
|
|
|
|
|
- **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with :ref:`set_anchors_preset<class_Control_method_set_anchors_preset>`.
|
|
- **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with :ref:`set_anchors_preset<class_Control_method_set_anchors_preset>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_LayoutPresetMode:
|
|
.. _enum_Control_LayoutPresetMode:
|
|
|
|
|
|
|
|
.. _class_Control_constant_PRESET_MODE_MINSIZE:
|
|
.. _class_Control_constant_PRESET_MODE_MINSIZE:
|
|
@@ -468,6 +490,8 @@ enum **LayoutPresetMode**:
|
|
|
|
|
|
|
|
- **PRESET_MODE_KEEP_SIZE** = **3** --- The control's size will not change.
|
|
- **PRESET_MODE_KEEP_SIZE** = **3** --- The control's size will not change.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_SizeFlags:
|
|
.. _enum_Control_SizeFlags:
|
|
|
|
|
|
|
|
.. _class_Control_constant_SIZE_FILL:
|
|
.. _class_Control_constant_SIZE_FILL:
|
|
@@ -492,6 +516,8 @@ enum **SizeFlags**:
|
|
|
|
|
|
|
|
- **SIZE_SHRINK_END** = **8** --- Tells the parent :ref:`Container<class_Container>` to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with :ref:`size_flags_horizontal<class_Control_property_size_flags_horizontal>` and :ref:`size_flags_vertical<class_Control_property_size_flags_vertical>`.
|
|
- **SIZE_SHRINK_END** = **8** --- Tells the parent :ref:`Container<class_Container>` to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with :ref:`size_flags_horizontal<class_Control_property_size_flags_horizontal>` and :ref:`size_flags_vertical<class_Control_property_size_flags_vertical>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_MouseFilter:
|
|
.. _enum_Control_MouseFilter:
|
|
|
|
|
|
|
|
.. _class_Control_constant_MOUSE_FILTER_STOP:
|
|
.. _class_Control_constant_MOUSE_FILTER_STOP:
|
|
@@ -508,6 +534,8 @@ enum **MouseFilter**:
|
|
|
|
|
|
|
|
- **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input<class_Control_method__gui_input>`. The control will also not receive the :ref:`mouse_entered<class_Control_signal_mouse_entered>` nor :ref:`mouse_exited<class_Control_signal_mouse_exited>` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically.
|
|
- **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input<class_Control_method__gui_input>`. The control will also not receive the :ref:`mouse_entered<class_Control_signal_mouse_entered>` nor :ref:`mouse_exited<class_Control_signal_mouse_exited>` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_GrowDirection:
|
|
.. _enum_Control_GrowDirection:
|
|
|
|
|
|
|
|
.. _class_Control_constant_GROW_DIRECTION_BEGIN:
|
|
.. _class_Control_constant_GROW_DIRECTION_BEGIN:
|
|
@@ -524,6 +552,8 @@ enum **GrowDirection**:
|
|
|
|
|
|
|
|
- **GROW_DIRECTION_BOTH** = **2** --- The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
|
|
- **GROW_DIRECTION_BOTH** = **2** --- The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _enum_Control_Anchor:
|
|
.. _enum_Control_Anchor:
|
|
|
|
|
|
|
|
.. _class_Control_constant_ANCHOR_BEGIN:
|
|
.. _class_Control_constant_ANCHOR_BEGIN:
|
|
@@ -614,6 +644,8 @@ Property Descriptions
|
|
|
|
|
|
|
|
Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_anchor_left:
|
|
.. _class_Control_property_anchor_left:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **anchor_left**
|
|
- :ref:`float<class_float>` **anchor_left**
|
|
@@ -626,6 +658,8 @@ Anchors the bottom edge of the node to the origin, the center, or the end of its
|
|
|
|
|
|
|
|
Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_anchor_right:
|
|
.. _class_Control_property_anchor_right:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **anchor_right**
|
|
- :ref:`float<class_float>` **anchor_right**
|
|
@@ -638,6 +672,8 @@ Anchors the left edge of the node to the origin, the center or the end of its pa
|
|
|
|
|
|
|
|
Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_anchor_top:
|
|
.. _class_Control_property_anchor_top:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **anchor_top**
|
|
- :ref:`float<class_float>` **anchor_top**
|
|
@@ -650,6 +686,8 @@ Anchors the right edge of the node to the origin, the center or the end of its p
|
|
|
|
|
|
|
|
Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the :ref:`Anchor<enum_Control_Anchor>` constants for convenience.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_mode:
|
|
.. _class_Control_property_focus_mode:
|
|
|
|
|
|
|
|
- :ref:`FocusMode<enum_Control_FocusMode>` **focus_mode**
|
|
- :ref:`FocusMode<enum_Control_FocusMode>` **focus_mode**
|
|
@@ -664,6 +702,8 @@ Anchors the top edge of the node to the origin, the center or the end of its par
|
|
|
|
|
|
|
|
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
|
|
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_neighbour_bottom:
|
|
.. _class_Control_property_focus_neighbour_bottom:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_bottom**
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_bottom**
|
|
@@ -678,6 +718,8 @@ The focus access mode for the control (None, Click or All). Only one Control can
|
|
|
|
|
|
|
|
Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the ``ui_down`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one.
|
|
Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the ``ui_down`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_neighbour_left:
|
|
.. _class_Control_property_focus_neighbour_left:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_left**
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_left**
|
|
@@ -692,6 +734,8 @@ Tells Godot which node it should give keyboard focus to if the user presses the
|
|
|
|
|
|
|
|
Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the ``ui_left`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the left of this one.
|
|
Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the ``ui_left`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the left of this one.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_neighbour_right:
|
|
.. _class_Control_property_focus_neighbour_right:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_right**
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_right**
|
|
@@ -706,6 +750,8 @@ Tells Godot which node it should give keyboard focus to if the user presses the
|
|
|
|
|
|
|
|
Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the ``ui_right`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one.
|
|
Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the ``ui_right`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_neighbour_top:
|
|
.. _class_Control_property_focus_neighbour_top:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_top**
|
|
- :ref:`NodePath<class_NodePath>` **focus_neighbour_top**
|
|
@@ -720,6 +766,8 @@ Tells Godot which node it should give keyboard focus to if the user presses the
|
|
|
|
|
|
|
|
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the ``ui_top`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one.
|
|
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the ``ui_top`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_next:
|
|
.. _class_Control_property_focus_next:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **focus_next**
|
|
- :ref:`NodePath<class_NodePath>` **focus_next**
|
|
@@ -736,6 +784,8 @@ Tells Godot which node it should give keyboard focus to if the user presses Tab
|
|
|
|
|
|
|
|
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
|
|
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_focus_previous:
|
|
.. _class_Control_property_focus_previous:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **focus_previous**
|
|
- :ref:`NodePath<class_NodePath>` **focus_previous**
|
|
@@ -752,6 +802,8 @@ Tells Godot which node it should give keyboard focus to if the user presses Shif
|
|
|
|
|
|
|
|
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
|
|
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_grow_horizontal:
|
|
.. _class_Control_property_grow_horizontal:
|
|
|
|
|
|
|
|
- :ref:`GrowDirection<enum_Control_GrowDirection>` **grow_horizontal**
|
|
- :ref:`GrowDirection<enum_Control_GrowDirection>` **grow_horizontal**
|
|
@@ -766,6 +818,8 @@ If this property is not set, Godot will select a "best guess" based on surroundi
|
|
|
|
|
|
|
|
Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
|
|
Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_grow_vertical:
|
|
.. _class_Control_property_grow_vertical:
|
|
|
|
|
|
|
|
- :ref:`GrowDirection<enum_Control_GrowDirection>` **grow_vertical**
|
|
- :ref:`GrowDirection<enum_Control_GrowDirection>` **grow_vertical**
|
|
@@ -780,6 +834,8 @@ Controls the direction on the horizontal axis in which the control should grow i
|
|
|
|
|
|
|
|
Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
|
|
Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_hint_tooltip:
|
|
.. _class_Control_property_hint_tooltip:
|
|
|
|
|
|
|
|
- :ref:`String<class_String>` **hint_tooltip**
|
|
- :ref:`String<class_String>` **hint_tooltip**
|
|
@@ -792,6 +848,8 @@ Controls the direction on the vertical axis in which the control should grow if
|
|
|
|
|
|
|
|
Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter<class_Control_property_mouse_filter>` property is not :ref:`MOUSE_FILTER_IGNORE<class_Control_constant_MOUSE_FILTER_IGNORE>`. You can change the time required for the tooltip to appear with ``gui/timers/tooltip_delay_sec`` option in Project Settings.
|
|
Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter<class_Control_property_mouse_filter>` property is not :ref:`MOUSE_FILTER_IGNORE<class_Control_constant_MOUSE_FILTER_IGNORE>`. You can change the time required for the tooltip to appear with ``gui/timers/tooltip_delay_sec`` option in Project Settings.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_margin_bottom:
|
|
.. _class_Control_property_margin_bottom:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **margin_bottom**
|
|
- :ref:`float<class_float>` **margin_bottom**
|
|
@@ -808,6 +866,8 @@ Distance between the node's bottom edge and its parent control, based on :ref:`a
|
|
|
|
|
|
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_margin_left:
|
|
.. _class_Control_property_margin_left:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **margin_left**
|
|
- :ref:`float<class_float>` **margin_left**
|
|
@@ -824,6 +884,8 @@ Distance between the node's left edge and its parent control, based on :ref:`anc
|
|
|
|
|
|
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_margin_right:
|
|
.. _class_Control_property_margin_right:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **margin_right**
|
|
- :ref:`float<class_float>` **margin_right**
|
|
@@ -840,6 +902,8 @@ Distance between the node's right edge and its parent control, based on :ref:`an
|
|
|
|
|
|
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_margin_top:
|
|
.. _class_Control_property_margin_top:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **margin_top**
|
|
- :ref:`float<class_float>` **margin_top**
|
|
@@ -856,6 +920,8 @@ Distance between the node's top edge and its parent control, based on :ref:`anch
|
|
|
|
|
|
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
Margins are often controlled by one or multiple parent :ref:`Container<class_Container>` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container<class_Container>`. Margins update automatically when you move or resize the node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_mouse_default_cursor_shape:
|
|
.. _class_Control_property_mouse_default_cursor_shape:
|
|
|
|
|
|
|
|
- :ref:`CursorShape<enum_Control_CursorShape>` **mouse_default_cursor_shape**
|
|
- :ref:`CursorShape<enum_Control_CursorShape>` **mouse_default_cursor_shape**
|
|
@@ -872,6 +938,8 @@ The default cursor shape for this control. Useful for Godot plugins and applicat
|
|
|
|
|
|
|
|
**Note:** On Linux, shapes may vary depending on the cursor theme of the system.
|
|
**Note:** On Linux, shapes may vary depending on the cursor theme of the system.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_mouse_filter:
|
|
.. _class_Control_property_mouse_filter:
|
|
|
|
|
|
|
|
- :ref:`MouseFilter<enum_Control_MouseFilter>` **mouse_filter**
|
|
- :ref:`MouseFilter<enum_Control_MouseFilter>` **mouse_filter**
|
|
@@ -886,6 +954,8 @@ The default cursor shape for this control. Useful for Godot plugins and applicat
|
|
|
|
|
|
|
|
Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input<class_Control_method__gui_input>` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered<class_Control_signal_mouse_entered>`, and :ref:`mouse_exited<class_Control_signal_mouse_exited>` signals. See the constants to learn what each does.
|
|
Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input<class_Control_method__gui_input>` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered<class_Control_signal_mouse_entered>`, and :ref:`mouse_exited<class_Control_signal_mouse_exited>` signals. See the constants to learn what each does.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_clip_content:
|
|
.. _class_Control_property_rect_clip_content:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **rect_clip_content**
|
|
- :ref:`bool<class_bool>` **rect_clip_content**
|
|
@@ -900,6 +970,8 @@ Controls whether the control will be able to receive mouse button input events t
|
|
|
|
|
|
|
|
Enables whether rendering of children should be clipped to this control's rectangle. If ``true``, parts of a child which would be visibly outside of this control's rectangle will not be rendered.
|
|
Enables whether rendering of children should be clipped to this control's rectangle. If ``true``, parts of a child which would be visibly outside of this control's rectangle will not be rendered.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_global_position:
|
|
.. _class_Control_property_rect_global_position:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **rect_global_position**
|
|
- :ref:`Vector2<class_Vector2>` **rect_global_position**
|
|
@@ -910,6 +982,8 @@ Enables whether rendering of children should be clipped to this control's rectan
|
|
|
|
|
|
|
|
The node's global position, relative to the world (usually to the top-left corner of the window).
|
|
The node's global position, relative to the world (usually to the top-left corner of the window).
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_min_size:
|
|
.. _class_Control_property_rect_min_size:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **rect_min_size**
|
|
- :ref:`Vector2<class_Vector2>` **rect_min_size**
|
|
@@ -924,6 +998,8 @@ The node's global position, relative to the world (usually to the top-left corne
|
|
|
|
|
|
|
|
The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
|
|
The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_pivot_offset:
|
|
.. _class_Control_property_rect_pivot_offset:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **rect_pivot_offset**
|
|
- :ref:`Vector2<class_Vector2>` **rect_pivot_offset**
|
|
@@ -938,6 +1014,8 @@ The minimum size of the node's bounding rectangle. If you set it to a value grea
|
|
|
|
|
|
|
|
By default, the node's pivot is its top-left corner. When you change its :ref:`rect_scale<class_Control_property_rect_scale>`, it will scale around this pivot. Set this property to :ref:`rect_size<class_Control_property_rect_size>` / 2 to center the pivot in the node's rectangle.
|
|
By default, the node's pivot is its top-left corner. When you change its :ref:`rect_scale<class_Control_property_rect_scale>`, it will scale around this pivot. Set this property to :ref:`rect_size<class_Control_property_rect_size>` / 2 to center the pivot in the node's rectangle.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_position:
|
|
.. _class_Control_property_rect_position:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **rect_position**
|
|
- :ref:`Vector2<class_Vector2>` **rect_position**
|
|
@@ -950,6 +1028,8 @@ By default, the node's pivot is its top-left corner. When you change its :ref:`r
|
|
|
|
|
|
|
|
The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by :ref:`rect_pivot_offset<class_Control_property_rect_pivot_offset>`.
|
|
The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by :ref:`rect_pivot_offset<class_Control_property_rect_pivot_offset>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_rotation:
|
|
.. _class_Control_property_rect_rotation:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **rect_rotation**
|
|
- :ref:`float<class_float>` **rect_rotation**
|
|
@@ -964,6 +1044,8 @@ The node's position, relative to its parent. It corresponds to the rectangle's t
|
|
|
|
|
|
|
|
The node's rotation around its pivot, in degrees. See :ref:`rect_pivot_offset<class_Control_property_rect_pivot_offset>` to change the pivot's position.
|
|
The node's rotation around its pivot, in degrees. See :ref:`rect_pivot_offset<class_Control_property_rect_pivot_offset>` to change the pivot's position.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_scale:
|
|
.. _class_Control_property_rect_scale:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **rect_scale**
|
|
- :ref:`Vector2<class_Vector2>` **rect_scale**
|
|
@@ -978,6 +1060,8 @@ The node's rotation around its pivot, in degrees. See :ref:`rect_pivot_offset<cl
|
|
|
|
|
|
|
|
The node's scale, relative to its :ref:`rect_size<class_Control_property_rect_size>`. Change this property to scale the node around its :ref:`rect_pivot_offset<class_Control_property_rect_pivot_offset>`.
|
|
The node's scale, relative to its :ref:`rect_size<class_Control_property_rect_size>`. Change this property to scale the node around its :ref:`rect_pivot_offset<class_Control_property_rect_pivot_offset>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_rect_size:
|
|
.. _class_Control_property_rect_size:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **rect_size**
|
|
- :ref:`Vector2<class_Vector2>` **rect_size**
|
|
@@ -990,6 +1074,8 @@ The node's scale, relative to its :ref:`rect_size<class_Control_property_rect_si
|
|
|
|
|
|
|
|
The size of the node's bounding rectangle, in pixels. :ref:`Container<class_Container>` nodes update this property automatically.
|
|
The size of the node's bounding rectangle, in pixels. :ref:`Container<class_Container>` nodes update this property automatically.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_size_flags_horizontal:
|
|
.. _class_Control_property_size_flags_horizontal:
|
|
|
|
|
|
|
|
- :ref:`int<class_int>` **size_flags_horizontal**
|
|
- :ref:`int<class_int>` **size_flags_horizontal**
|
|
@@ -1004,6 +1090,8 @@ The size of the node's bounding rectangle, in pixels. :ref:`Container<class_Cont
|
|
|
|
|
|
|
|
Tells the parent :ref:`Container<class_Container>` nodes how they should resize and place the node on the X axis. Use one of the :ref:`SizeFlags<enum_Control_SizeFlags>` constants to change the flags. See the constants to learn what each does.
|
|
Tells the parent :ref:`Container<class_Container>` nodes how they should resize and place the node on the X axis. Use one of the :ref:`SizeFlags<enum_Control_SizeFlags>` constants to change the flags. See the constants to learn what each does.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_size_flags_stretch_ratio:
|
|
.. _class_Control_property_size_flags_stretch_ratio:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **size_flags_stretch_ratio**
|
|
- :ref:`float<class_float>` **size_flags_stretch_ratio**
|
|
@@ -1018,6 +1106,8 @@ Tells the parent :ref:`Container<class_Container>` nodes how they should resize
|
|
|
|
|
|
|
|
If the node and at least one of its neighbours uses the :ref:`SIZE_EXPAND<class_Control_constant_SIZE_EXPAND>` size flag, the parent :ref:`Container<class_Container>` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space.
|
|
If the node and at least one of its neighbours uses the :ref:`SIZE_EXPAND<class_Control_constant_SIZE_EXPAND>` size flag, the parent :ref:`Container<class_Container>` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_size_flags_vertical:
|
|
.. _class_Control_property_size_flags_vertical:
|
|
|
|
|
|
|
|
- :ref:`int<class_int>` **size_flags_vertical**
|
|
- :ref:`int<class_int>` **size_flags_vertical**
|
|
@@ -1032,6 +1122,8 @@ If the node and at least one of its neighbours uses the :ref:`SIZE_EXPAND<class_
|
|
|
|
|
|
|
|
Tells the parent :ref:`Container<class_Container>` nodes how they should resize and place the node on the Y axis. Use one of the :ref:`SizeFlags<enum_Control_SizeFlags>` constants to change the flags. See the constants to learn what each does.
|
|
Tells the parent :ref:`Container<class_Container>` nodes how they should resize and place the node on the Y axis. Use one of the :ref:`SizeFlags<enum_Control_SizeFlags>` constants to change the flags. See the constants to learn what each does.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_property_theme:
|
|
.. _class_Control_property_theme:
|
|
|
|
|
|
|
|
- :ref:`Theme<class_Theme>` **theme**
|
|
- :ref:`Theme<class_Theme>` **theme**
|
|
@@ -1055,6 +1147,8 @@ Virtual method to be implemented by the user. Returns whether :ref:`_gui_input<c
|
|
|
|
|
|
|
|
If not overridden, defaults to ``false``.
|
|
If not overridden, defaults to ``false``.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method__get_minimum_size:
|
|
.. _class_Control_method__get_minimum_size:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **_get_minimum_size** **(** **)** virtual
|
|
- :ref:`Vector2<class_Vector2>` **_get_minimum_size** **(** **)** virtual
|
|
@@ -1063,6 +1157,8 @@ Virtual method to be implemented by the user. Returns the minimum size for this
|
|
|
|
|
|
|
|
If not overridden, defaults to :ref:`Vector2.ZERO<class_Vector2_constant_ZERO>`.
|
|
If not overridden, defaults to :ref:`Vector2.ZERO<class_Vector2_constant_ZERO>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method__gui_input:
|
|
.. _class_Control_method__gui_input:
|
|
|
|
|
|
|
|
- void **_gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** virtual
|
|
- void **_gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** virtual
|
|
@@ -1090,6 +1186,8 @@ The event won't trigger if:
|
|
|
|
|
|
|
|
\* it happens outside parent's rectangle and the parent has either :ref:`rect_clip_content<class_Control_property_rect_clip_content>` or :ref:`_clips_input<class_Control_method__clips_input>` enabled.
|
|
\* it happens outside parent's rectangle and the parent has either :ref:`rect_clip_content<class_Control_property_rect_clip_content>` or :ref:`_clips_input<class_Control_method__clips_input>` enabled.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method__make_custom_tooltip:
|
|
.. _class_Control_method__make_custom_tooltip:
|
|
|
|
|
|
|
|
- :ref:`Object<class_Object>` **_make_custom_tooltip** **(** :ref:`String<class_String>` for_text **)** virtual
|
|
- :ref:`Object<class_Object>` **_make_custom_tooltip** **(** :ref:`String<class_String>` for_text **)** virtual
|
|
@@ -1118,48 +1216,64 @@ Example of usage with custom scene instance:
|
|
|
tooltip.get_node("Label").text = for_text
|
|
tooltip.get_node("Label").text = for_text
|
|
|
return tooltip
|
|
return tooltip
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_accept_event:
|
|
.. _class_Control_method_accept_event:
|
|
|
|
|
|
|
|
- void **accept_event** **(** **)**
|
|
- void **accept_event** **(** **)**
|
|
|
|
|
|
|
|
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input<class_Node_method__unhandled_input>` or :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`.
|
|
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input<class_Node_method__unhandled_input>` or :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_add_color_override:
|
|
.. _class_Control_method_add_color_override:
|
|
|
|
|
|
|
|
- void **add_color_override** **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color **)**
|
|
- void **add_color_override** **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color **)**
|
|
|
|
|
|
|
|
Overrides the :ref:`Color<class_Color>` with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If the ``color`` is empty or invalid, the override is cleared and the color from assigned :ref:`Theme<class_Theme>` is used.
|
|
Overrides the :ref:`Color<class_Color>` with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If the ``color`` is empty or invalid, the override is cleared and the color from assigned :ref:`Theme<class_Theme>` is used.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_add_constant_override:
|
|
.. _class_Control_method_add_constant_override:
|
|
|
|
|
|
|
|
- void **add_constant_override** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` constant **)**
|
|
- void **add_constant_override** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` constant **)**
|
|
|
|
|
|
|
|
Overrides an integer constant with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If the ``constant`` is empty or invalid, the override is cleared and the constant from assigned :ref:`Theme<class_Theme>` is used.
|
|
Overrides an integer constant with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If the ``constant`` is empty or invalid, the override is cleared and the constant from assigned :ref:`Theme<class_Theme>` is used.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_add_font_override:
|
|
.. _class_Control_method_add_font_override:
|
|
|
|
|
|
|
|
- void **add_font_override** **(** :ref:`String<class_String>` name, :ref:`Font<class_Font>` font **)**
|
|
- void **add_font_override** **(** :ref:`String<class_String>` name, :ref:`Font<class_Font>` font **)**
|
|
|
|
|
|
|
|
Overrides the font with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``font`` is empty or invalid, the override is cleared and the font from assigned :ref:`Theme<class_Theme>` is used.
|
|
Overrides the font with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``font`` is empty or invalid, the override is cleared and the font from assigned :ref:`Theme<class_Theme>` is used.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_add_icon_override:
|
|
.. _class_Control_method_add_icon_override:
|
|
|
|
|
|
|
|
- void **add_icon_override** **(** :ref:`String<class_String>` name, :ref:`Texture<class_Texture>` texture **)**
|
|
- void **add_icon_override** **(** :ref:`String<class_String>` name, :ref:`Texture<class_Texture>` texture **)**
|
|
|
|
|
|
|
|
Overrides the icon with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``icon`` is empty or invalid, the override is cleared and the icon from assigned :ref:`Theme<class_Theme>` is used.
|
|
Overrides the icon with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``icon`` is empty or invalid, the override is cleared and the icon from assigned :ref:`Theme<class_Theme>` is used.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_add_shader_override:
|
|
.. _class_Control_method_add_shader_override:
|
|
|
|
|
|
|
|
- void **add_shader_override** **(** :ref:`String<class_String>` name, :ref:`Shader<class_Shader>` shader **)**
|
|
- void **add_shader_override** **(** :ref:`String<class_String>` name, :ref:`Shader<class_Shader>` shader **)**
|
|
|
|
|
|
|
|
Overrides the :ref:`Shader<class_Shader>` with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``shader`` is empty or invalid, the override is cleared and the shader from assigned :ref:`Theme<class_Theme>` is used.
|
|
Overrides the :ref:`Shader<class_Shader>` with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``shader`` is empty or invalid, the override is cleared and the shader from assigned :ref:`Theme<class_Theme>` is used.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_add_stylebox_override:
|
|
.. _class_Control_method_add_stylebox_override:
|
|
|
|
|
|
|
|
- void **add_stylebox_override** **(** :ref:`String<class_String>` name, :ref:`StyleBox<class_StyleBox>` stylebox **)**
|
|
- void **add_stylebox_override** **(** :ref:`String<class_String>` name, :ref:`StyleBox<class_StyleBox>` stylebox **)**
|
|
|
|
|
|
|
|
Overrides the :ref:`StyleBox<class_StyleBox>` with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``stylebox`` is empty or invalid, the override is cleared and the :ref:`StyleBox<class_StyleBox>` from assigned :ref:`Theme<class_Theme>` is used.
|
|
Overrides the :ref:`StyleBox<class_StyleBox>` with given ``name`` in the :ref:`theme<class_Control_property_theme>` resource the control uses. If ``stylebox`` is empty or invalid, the override is cleared and the :ref:`StyleBox<class_StyleBox>` from assigned :ref:`Theme<class_Theme>` is used.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_can_drop_data:
|
|
.. _class_Control_method_can_drop_data:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **can_drop_data** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Variant<class_Variant>` data **)** virtual
|
|
- :ref:`bool<class_bool>` **can_drop_data** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Variant<class_Variant>` data **)** virtual
|
|
@@ -1175,6 +1289,8 @@ This method should only be used to test the data. Process the data in :ref:`drop
|
|
|
# Otherwise, just check data
|
|
# Otherwise, just check data
|
|
|
return typeof(data) == TYPE_DICTIONARY and data.has("expected")
|
|
return typeof(data) == TYPE_DICTIONARY and data.has("expected")
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_drop_data:
|
|
.. _class_Control_method_drop_data:
|
|
|
|
|
|
|
|
- void **drop_data** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Variant<class_Variant>` data **)** virtual
|
|
- void **drop_data** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Variant<class_Variant>` data **)** virtual
|
|
@@ -1189,6 +1305,8 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`get_drag
|
|
|
func drop_data(position, data):
|
|
func drop_data(position, data):
|
|
|
color = data["color"]
|
|
color = data["color"]
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_force_drag:
|
|
.. _class_Control_method_force_drag:
|
|
|
|
|
|
|
|
- void **force_drag** **(** :ref:`Variant<class_Variant>` data, :ref:`Control<class_Control>` preview **)**
|
|
- void **force_drag** **(** :ref:`Variant<class_Variant>` data, :ref:`Control<class_Control>` preview **)**
|
|
@@ -1197,18 +1315,24 @@ Forces drag and bypasses :ref:`get_drag_data<class_Control_method_get_drag_data>
|
|
|
|
|
|
|
|
The methods :ref:`can_drop_data<class_Control_method_can_drop_data>` and :ref:`drop_data<class_Control_method_drop_data>` must be implemented on controls that want to receive drop data.
|
|
The methods :ref:`can_drop_data<class_Control_method_can_drop_data>` and :ref:`drop_data<class_Control_method_drop_data>` must be implemented on controls that want to receive drop data.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_anchor:
|
|
.. _class_Control_method_get_anchor:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **get_anchor** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
|
|
- :ref:`float<class_float>` **get_anchor** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
|
|
|
|
|
|
|
|
Returns the anchor identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum. A getter method for :ref:`anchor_bottom<class_Control_property_anchor_bottom>`, :ref:`anchor_left<class_Control_property_anchor_left>`, :ref:`anchor_right<class_Control_property_anchor_right>` and :ref:`anchor_top<class_Control_property_anchor_top>`.
|
|
Returns the anchor identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum. A getter method for :ref:`anchor_bottom<class_Control_property_anchor_bottom>`, :ref:`anchor_left<class_Control_property_anchor_left>`, :ref:`anchor_right<class_Control_property_anchor_right>` and :ref:`anchor_top<class_Control_property_anchor_top>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_begin:
|
|
.. _class_Control_method_get_begin:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_begin** **(** **)** const
|
|
- :ref:`Vector2<class_Vector2>` **get_begin** **(** **)** const
|
|
|
|
|
|
|
|
Returns :ref:`margin_left<class_Control_property_margin_left>` and :ref:`margin_top<class_Control_property_margin_top>`. See also :ref:`rect_position<class_Control_property_rect_position>`.
|
|
Returns :ref:`margin_left<class_Control_property_margin_left>` and :ref:`margin_top<class_Control_property_margin_top>`. See also :ref:`rect_position<class_Control_property_rect_position>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_color:
|
|
.. _class_Control_method_get_color:
|
|
|
|
|
|
|
|
- :ref:`Color<class_Color>` **get_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`Color<class_Color>` **get_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
@@ -1220,24 +1344,32 @@ Returns a color from assigned :ref:`Theme<class_Theme>` with given ``name`` and
|
|
|
func _ready():
|
|
func _ready():
|
|
|
modulate = get_color("font_color", "Button") #get the color defined for button fonts
|
|
modulate = get_color("font_color", "Button") #get the color defined for button fonts
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_combined_minimum_size:
|
|
.. _class_Control_method_get_combined_minimum_size:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_combined_minimum_size** **(** **)** const
|
|
- :ref:`Vector2<class_Vector2>` **get_combined_minimum_size** **(** **)** const
|
|
|
|
|
|
|
|
Returns combined minimum size from :ref:`rect_min_size<class_Control_property_rect_min_size>` and :ref:`get_minimum_size<class_Control_method_get_minimum_size>`.
|
|
Returns combined minimum size from :ref:`rect_min_size<class_Control_property_rect_min_size>` and :ref:`get_minimum_size<class_Control_method_get_minimum_size>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_constant:
|
|
.. _class_Control_method_get_constant:
|
|
|
|
|
|
|
|
- :ref:`int<class_int>` **get_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`int<class_int>` **get_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns a constant from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
Returns a constant from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_cursor_shape:
|
|
.. _class_Control_method_get_cursor_shape:
|
|
|
|
|
|
|
|
- :ref:`CursorShape<enum_Control_CursorShape>` **get_cursor_shape** **(** :ref:`Vector2<class_Vector2>` position=Vector2( 0, 0 ) **)** const
|
|
- :ref:`CursorShape<enum_Control_CursorShape>` **get_cursor_shape** **(** :ref:`Vector2<class_Vector2>` position=Vector2( 0, 0 ) **)** const
|
|
|
|
|
|
|
|
Returns the mouse cursor shape the control displays on mouse hover. See :ref:`CursorShape<enum_Control_CursorShape>`.
|
|
Returns the mouse cursor shape the control displays on mouse hover. See :ref:`CursorShape<enum_Control_CursorShape>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_drag_data:
|
|
.. _class_Control_method_get_drag_data:
|
|
|
|
|
|
|
|
- :ref:`Variant<class_Variant>` **get_drag_data** **(** :ref:`Vector2<class_Vector2>` position **)** virtual
|
|
- :ref:`Variant<class_Variant>` **get_drag_data** **(** :ref:`Vector2<class_Vector2>` position **)** virtual
|
|
@@ -1253,90 +1385,120 @@ A preview that will follow the mouse that should represent the data can be set w
|
|
|
set_drag_preview(make_preview(mydata))
|
|
set_drag_preview(make_preview(mydata))
|
|
|
return mydata
|
|
return mydata
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_end:
|
|
.. _class_Control_method_get_end:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_end** **(** **)** const
|
|
- :ref:`Vector2<class_Vector2>` **get_end** **(** **)** const
|
|
|
|
|
|
|
|
Returns :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_bottom<class_Control_property_margin_bottom>`.
|
|
Returns :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_bottom<class_Control_property_margin_bottom>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_focus_neighbour:
|
|
.. _class_Control_method_get_focus_neighbour:
|
|
|
|
|
|
|
|
- :ref:`NodePath<class_NodePath>` **get_focus_neighbour** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
|
|
- :ref:`NodePath<class_NodePath>` **get_focus_neighbour** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
|
|
|
|
|
|
|
|
Returns the focus neighbour identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum. A getter method for :ref:`focus_neighbour_bottom<class_Control_property_focus_neighbour_bottom>`, :ref:`focus_neighbour_left<class_Control_property_focus_neighbour_left>`, :ref:`focus_neighbour_right<class_Control_property_focus_neighbour_right>` and :ref:`focus_neighbour_top<class_Control_property_focus_neighbour_top>`.
|
|
Returns the focus neighbour identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum. A getter method for :ref:`focus_neighbour_bottom<class_Control_property_focus_neighbour_bottom>`, :ref:`focus_neighbour_left<class_Control_property_focus_neighbour_left>`, :ref:`focus_neighbour_right<class_Control_property_focus_neighbour_right>` and :ref:`focus_neighbour_top<class_Control_property_focus_neighbour_top>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_focus_owner:
|
|
.. _class_Control_method_get_focus_owner:
|
|
|
|
|
|
|
|
- :ref:`Control<class_Control>` **get_focus_owner** **(** **)** const
|
|
- :ref:`Control<class_Control>` **get_focus_owner** **(** **)** const
|
|
|
|
|
|
|
|
Returns the control that has the keyboard focus or ``null`` if none.
|
|
Returns the control that has the keyboard focus or ``null`` if none.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_font:
|
|
.. _class_Control_method_get_font:
|
|
|
|
|
|
|
|
- :ref:`Font<class_Font>` **get_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`Font<class_Font>` **get_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns a font from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
Returns a font from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_global_rect:
|
|
.. _class_Control_method_get_global_rect:
|
|
|
|
|
|
|
|
- :ref:`Rect2<class_Rect2>` **get_global_rect** **(** **)** const
|
|
- :ref:`Rect2<class_Rect2>` **get_global_rect** **(** **)** const
|
|
|
|
|
|
|
|
Returns the position and size of the control relative to the top-left corner of the screen. See :ref:`rect_position<class_Control_property_rect_position>` and :ref:`rect_size<class_Control_property_rect_size>`.
|
|
Returns the position and size of the control relative to the top-left corner of the screen. See :ref:`rect_position<class_Control_property_rect_position>` and :ref:`rect_size<class_Control_property_rect_size>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_icon:
|
|
.. _class_Control_method_get_icon:
|
|
|
|
|
|
|
|
- :ref:`Texture<class_Texture>` **get_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`Texture<class_Texture>` **get_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns an icon from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
Returns an icon from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_margin:
|
|
.. _class_Control_method_get_margin:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **get_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
|
|
- :ref:`float<class_float>` **get_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
|
|
|
|
|
|
|
|
Returns the anchor identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum. A getter method for :ref:`margin_bottom<class_Control_property_margin_bottom>`, :ref:`margin_left<class_Control_property_margin_left>`, :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_top<class_Control_property_margin_top>`.
|
|
Returns the anchor identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum. A getter method for :ref:`margin_bottom<class_Control_property_margin_bottom>`, :ref:`margin_left<class_Control_property_margin_left>`, :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_top<class_Control_property_margin_top>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_minimum_size:
|
|
.. _class_Control_method_get_minimum_size:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_minimum_size** **(** **)** const
|
|
- :ref:`Vector2<class_Vector2>` **get_minimum_size** **(** **)** const
|
|
|
|
|
|
|
|
Returns the minimum size for this control. See :ref:`rect_min_size<class_Control_property_rect_min_size>`.
|
|
Returns the minimum size for this control. See :ref:`rect_min_size<class_Control_property_rect_min_size>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_parent_area_size:
|
|
.. _class_Control_method_get_parent_area_size:
|
|
|
|
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_parent_area_size** **(** **)** const
|
|
- :ref:`Vector2<class_Vector2>` **get_parent_area_size** **(** **)** const
|
|
|
|
|
|
|
|
Returns the width/height occupied in the parent control.
|
|
Returns the width/height occupied in the parent control.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_parent_control:
|
|
.. _class_Control_method_get_parent_control:
|
|
|
|
|
|
|
|
- :ref:`Control<class_Control>` **get_parent_control** **(** **)** const
|
|
- :ref:`Control<class_Control>` **get_parent_control** **(** **)** const
|
|
|
|
|
|
|
|
Returns the parent control node.
|
|
Returns the parent control node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_rect:
|
|
.. _class_Control_method_get_rect:
|
|
|
|
|
|
|
|
- :ref:`Rect2<class_Rect2>` **get_rect** **(** **)** const
|
|
- :ref:`Rect2<class_Rect2>` **get_rect** **(** **)** const
|
|
|
|
|
|
|
|
Returns the position and size of the control relative to the top-left corner of the parent Control. See :ref:`rect_position<class_Control_property_rect_position>` and :ref:`rect_size<class_Control_property_rect_size>`.
|
|
Returns the position and size of the control relative to the top-left corner of the parent Control. See :ref:`rect_position<class_Control_property_rect_position>` and :ref:`rect_size<class_Control_property_rect_size>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_rotation:
|
|
.. _class_Control_method_get_rotation:
|
|
|
|
|
|
|
|
- :ref:`float<class_float>` **get_rotation** **(** **)** const
|
|
- :ref:`float<class_float>` **get_rotation** **(** **)** const
|
|
|
|
|
|
|
|
Returns the rotation (in radians).
|
|
Returns the rotation (in radians).
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_stylebox:
|
|
.. _class_Control_method_get_stylebox:
|
|
|
|
|
|
|
|
- :ref:`StyleBox<class_StyleBox>` **get_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`StyleBox<class_StyleBox>` **get_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns a :ref:`StyleBox<class_StyleBox>` from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
Returns a :ref:`StyleBox<class_StyleBox>` from assigned :ref:`Theme<class_Theme>` with given ``name`` and associated with ``Control`` of given ``type``.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_get_tooltip:
|
|
.. _class_Control_method_get_tooltip:
|
|
|
|
|
|
|
|
- :ref:`String<class_String>` **get_tooltip** **(** :ref:`Vector2<class_Vector2>` at_position=Vector2( 0, 0 ) **)** const
|
|
- :ref:`String<class_String>` **get_tooltip** **(** :ref:`Vector2<class_Vector2>` at_position=Vector2( 0, 0 ) **)** const
|
|
|
|
|
|
|
|
Returns the tooltip, which will appear when the cursor is resting over this control. See :ref:`hint_tooltip<class_Control_property_hint_tooltip>`.
|
|
Returns the tooltip, which will appear when the cursor is resting over this control. See :ref:`hint_tooltip<class_Control_property_hint_tooltip>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_grab_click_focus:
|
|
.. _class_Control_method_grab_click_focus:
|
|
|
|
|
|
|
|
- void **grab_click_focus** **(** **)**
|
|
- void **grab_click_focus** **(** **)**
|
|
@@ -1348,66 +1510,88 @@ Creates an :ref:`InputEventMouseButton<class_InputEventMouseButton>` that attemp
|
|
|
func _process(delta):
|
|
func _process(delta):
|
|
|
grab_click_focus() #when clicking another Control node, this node will be clicked instead
|
|
grab_click_focus() #when clicking another Control node, this node will be clicked instead
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_grab_focus:
|
|
.. _class_Control_method_grab_focus:
|
|
|
|
|
|
|
|
- void **grab_focus** **(** **)**
|
|
- void **grab_focus** **(** **)**
|
|
|
|
|
|
|
|
Steal the focus from another control and become the focused control (see :ref:`focus_mode<class_Control_property_focus_mode>`).
|
|
Steal the focus from another control and become the focused control (see :ref:`focus_mode<class_Control_property_focus_mode>`).
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_color:
|
|
.. _class_Control_method_has_color:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`bool<class_bool>` **has_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if :ref:`Color<class_Color>` with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
Returns ``true`` if :ref:`Color<class_Color>` with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_color_override:
|
|
.. _class_Control_method_has_color_override:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_color_override** **(** :ref:`String<class_String>` name **)** const
|
|
- :ref:`bool<class_bool>` **has_color_override** **(** :ref:`String<class_String>` name **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if :ref:`Color<class_Color>` with given ``name`` has a valid override in this ``Control`` node.
|
|
Returns ``true`` if :ref:`Color<class_Color>` with given ``name`` has a valid override in this ``Control`` node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_constant:
|
|
.. _class_Control_method_has_constant:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`bool<class_bool>` **has_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if constant with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
Returns ``true`` if constant with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_constant_override:
|
|
.. _class_Control_method_has_constant_override:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_constant_override** **(** :ref:`String<class_String>` name **)** const
|
|
- :ref:`bool<class_bool>` **has_constant_override** **(** :ref:`String<class_String>` name **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if constant with given ``name`` has a valid override in this ``Control`` node.
|
|
Returns ``true`` if constant with given ``name`` has a valid override in this ``Control`` node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_focus:
|
|
.. _class_Control_method_has_focus:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_focus** **(** **)** const
|
|
- :ref:`bool<class_bool>` **has_focus** **(** **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if this is the current focused control. See :ref:`focus_mode<class_Control_property_focus_mode>`.
|
|
Returns ``true`` if this is the current focused control. See :ref:`focus_mode<class_Control_property_focus_mode>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_font:
|
|
.. _class_Control_method_has_font:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`bool<class_bool>` **has_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if font with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
Returns ``true`` if font with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_font_override:
|
|
.. _class_Control_method_has_font_override:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_font_override** **(** :ref:`String<class_String>` name **)** const
|
|
- :ref:`bool<class_bool>` **has_font_override** **(** :ref:`String<class_String>` name **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if font with given ``name`` has a valid override in this ``Control`` node.
|
|
Returns ``true`` if font with given ``name`` has a valid override in this ``Control`` node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_icon:
|
|
.. _class_Control_method_has_icon:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`bool<class_bool>` **has_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if icon with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
Returns ``true`` if icon with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_icon_override:
|
|
.. _class_Control_method_has_icon_override:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_icon_override** **(** :ref:`String<class_String>` name **)** const
|
|
- :ref:`bool<class_bool>` **has_icon_override** **(** :ref:`String<class_String>` name **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if icon with given ``name`` has a valid override in this ``Control`` node.
|
|
Returns ``true`` if icon with given ``name`` has a valid override in this ``Control`` node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_point:
|
|
.. _class_Control_method_has_point:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_point** **(** :ref:`Vector2<class_Vector2>` point **)** virtual
|
|
- :ref:`bool<class_bool>` **has_point** **(** :ref:`Vector2<class_Vector2>` point **)** virtual
|
|
@@ -1418,36 +1602,48 @@ If not overridden, default behavior is checking if the point is within control's
|
|
|
|
|
|
|
|
**Node:** If you want to check if a point is inside the control, you can use ``get_rect().has_point(point)``.
|
|
**Node:** If you want to check if a point is inside the control, you can use ``get_rect().has_point(point)``.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_shader_override:
|
|
.. _class_Control_method_has_shader_override:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_shader_override** **(** :ref:`String<class_String>` name **)** const
|
|
- :ref:`bool<class_bool>` **has_shader_override** **(** :ref:`String<class_String>` name **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if :ref:`Shader<class_Shader>` with given ``name`` has a valid override in this ``Control`` node.
|
|
Returns ``true`` if :ref:`Shader<class_Shader>` with given ``name`` has a valid override in this ``Control`` node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_stylebox:
|
|
.. _class_Control_method_has_stylebox:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
- :ref:`bool<class_bool>` **has_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type="" **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if :ref:`StyleBox<class_StyleBox>` with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
Returns ``true`` if :ref:`StyleBox<class_StyleBox>` with given ``name`` and associated with ``Control`` of given ``type`` exists in assigned :ref:`Theme<class_Theme>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_has_stylebox_override:
|
|
.. _class_Control_method_has_stylebox_override:
|
|
|
|
|
|
|
|
- :ref:`bool<class_bool>` **has_stylebox_override** **(** :ref:`String<class_String>` name **)** const
|
|
- :ref:`bool<class_bool>` **has_stylebox_override** **(** :ref:`String<class_String>` name **)** const
|
|
|
|
|
|
|
|
Returns ``true`` if :ref:`StyleBox<class_StyleBox>` with given ``name`` has a valid override in this ``Control`` node.
|
|
Returns ``true`` if :ref:`StyleBox<class_StyleBox>` with given ``name`` has a valid override in this ``Control`` node.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_minimum_size_changed:
|
|
.. _class_Control_method_minimum_size_changed:
|
|
|
|
|
|
|
|
- void **minimum_size_changed** **(** **)**
|
|
- void **minimum_size_changed** **(** **)**
|
|
|
|
|
|
|
|
Invalidates the size cache in this node and in parent nodes up to toplevel. Intended to be used with :ref:`get_minimum_size<class_Control_method_get_minimum_size>` when the return value is changed. Setting :ref:`rect_min_size<class_Control_property_rect_min_size>` directly calls this method automatically.
|
|
Invalidates the size cache in this node and in parent nodes up to toplevel. Intended to be used with :ref:`get_minimum_size<class_Control_method_get_minimum_size>` when the return value is changed. Setting :ref:`rect_min_size<class_Control_property_rect_min_size>` directly calls this method automatically.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_release_focus:
|
|
.. _class_Control_method_release_focus:
|
|
|
|
|
|
|
|
- void **release_focus** **(** **)**
|
|
- void **release_focus** **(** **)**
|
|
|
|
|
|
|
|
Give up the focus. No other control will be able to receive keyboard input.
|
|
Give up the focus. No other control will be able to receive keyboard input.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_anchor:
|
|
.. _class_Control_method_set_anchor:
|
|
|
|
|
|
|
|
- void **set_anchor** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` anchor, :ref:`bool<class_bool>` keep_margin=false, :ref:`bool<class_bool>` push_opposite_anchor=true **)**
|
|
- void **set_anchor** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` anchor, :ref:`bool<class_bool>` keep_margin=false, :ref:`bool<class_bool>` push_opposite_anchor=true **)**
|
|
@@ -1458,18 +1654,24 @@ If ``keep_margin`` is ``true``, margins aren't updated after this operation.
|
|
|
|
|
|
|
|
If ``push_opposite_anchor`` is ``true`` and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If ``push_opposite_anchor`` was ``false``, the left anchor would get value 0.5.
|
|
If ``push_opposite_anchor`` is ``true`` and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If ``push_opposite_anchor`` was ``false``, the left anchor would get value 0.5.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_anchor_and_margin:
|
|
.. _class_Control_method_set_anchor_and_margin:
|
|
|
|
|
|
|
|
- void **set_anchor_and_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` anchor, :ref:`float<class_float>` offset, :ref:`bool<class_bool>` push_opposite_anchor=false **)**
|
|
- void **set_anchor_and_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` anchor, :ref:`float<class_float>` offset, :ref:`bool<class_bool>` push_opposite_anchor=false **)**
|
|
|
|
|
|
|
|
Works the same as :ref:`set_anchor<class_Control_method_set_anchor>`, but instead of ``keep_margin`` argument and automatic update of margin, it allows to set the margin offset yourself (see :ref:`set_margin<class_Control_method_set_margin>`).
|
|
Works the same as :ref:`set_anchor<class_Control_method_set_anchor>`, but instead of ``keep_margin`` argument and automatic update of margin, it allows to set the margin offset yourself (see :ref:`set_margin<class_Control_method_set_margin>`).
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_anchors_and_margins_preset:
|
|
.. _class_Control_method_set_anchors_and_margins_preset:
|
|
|
|
|
|
|
|
- void **set_anchors_and_margins_preset** **(** :ref:`LayoutPreset<enum_Control_LayoutPreset>` preset, :ref:`LayoutPresetMode<enum_Control_LayoutPresetMode>` resize_mode=0, :ref:`int<class_int>` margin=0 **)**
|
|
- void **set_anchors_and_margins_preset** **(** :ref:`LayoutPreset<enum_Control_LayoutPreset>` preset, :ref:`LayoutPresetMode<enum_Control_LayoutPresetMode>` resize_mode=0, :ref:`int<class_int>` margin=0 **)**
|
|
|
|
|
|
|
|
Sets both anchor preset and margin preset. See :ref:`set_anchors_preset<class_Control_method_set_anchors_preset>` and :ref:`set_margins_preset<class_Control_method_set_margins_preset>`.
|
|
Sets both anchor preset and margin preset. See :ref:`set_anchors_preset<class_Control_method_set_anchors_preset>` and :ref:`set_margins_preset<class_Control_method_set_margins_preset>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_anchors_preset:
|
|
.. _class_Control_method_set_anchors_preset:
|
|
|
|
|
|
|
|
- void **set_anchors_preset** **(** :ref:`LayoutPreset<enum_Control_LayoutPreset>` preset, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
- void **set_anchors_preset** **(** :ref:`LayoutPreset<enum_Control_LayoutPreset>` preset, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
@@ -1478,12 +1680,16 @@ Sets the anchors to a ``preset`` from :ref:`LayoutPreset<enum_Control_LayoutPres
|
|
|
|
|
|
|
|
If ``keep_margins`` is ``true``, control's position will also be updated.
|
|
If ``keep_margins`` is ``true``, control's position will also be updated.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_begin:
|
|
.. _class_Control_method_set_begin:
|
|
|
|
|
|
|
|
- void **set_begin** **(** :ref:`Vector2<class_Vector2>` position **)**
|
|
- void **set_begin** **(** :ref:`Vector2<class_Vector2>` position **)**
|
|
|
|
|
|
|
|
Sets :ref:`margin_left<class_Control_property_margin_left>` and :ref:`margin_top<class_Control_property_margin_top>` at the same time. Equivalent of changing :ref:`rect_position<class_Control_property_rect_position>`.
|
|
Sets :ref:`margin_left<class_Control_property_margin_left>` and :ref:`margin_top<class_Control_property_margin_top>` at the same time. Equivalent of changing :ref:`rect_position<class_Control_property_rect_position>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_drag_forwarding:
|
|
.. _class_Control_method_set_drag_forwarding:
|
|
|
|
|
|
|
|
- void **set_drag_forwarding** **(** :ref:`Control<class_Control>` target **)**
|
|
- void **set_drag_forwarding** **(** :ref:`Control<class_Control>` target **)**
|
|
@@ -1515,24 +1721,32 @@ Forwarding can be implemented in the target control similar to the methods :ref:
|
|
|
set_drag_preview(my_preview)
|
|
set_drag_preview(my_preview)
|
|
|
return my_data()
|
|
return my_data()
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_drag_preview:
|
|
.. _class_Control_method_set_drag_preview:
|
|
|
|
|
|
|
|
- void **set_drag_preview** **(** :ref:`Control<class_Control>` control **)**
|
|
- void **set_drag_preview** **(** :ref:`Control<class_Control>` control **)**
|
|
|
|
|
|
|
|
Shows the given control at the mouse pointer. A good time to call this method is in :ref:`get_drag_data<class_Control_method_get_drag_data>`.
|
|
Shows the given control at the mouse pointer. A good time to call this method is in :ref:`get_drag_data<class_Control_method_get_drag_data>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_end:
|
|
.. _class_Control_method_set_end:
|
|
|
|
|
|
|
|
- void **set_end** **(** :ref:`Vector2<class_Vector2>` position **)**
|
|
- void **set_end** **(** :ref:`Vector2<class_Vector2>` position **)**
|
|
|
|
|
|
|
|
Sets :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_bottom<class_Control_property_margin_bottom>` at the same time.
|
|
Sets :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_bottom<class_Control_property_margin_bottom>` at the same time.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_focus_neighbour:
|
|
.. _class_Control_method_set_focus_neighbour:
|
|
|
|
|
|
|
|
- void **set_focus_neighbour** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`NodePath<class_NodePath>` neighbour **)**
|
|
- void **set_focus_neighbour** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`NodePath<class_NodePath>` neighbour **)**
|
|
|
|
|
|
|
|
Sets the anchor identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum to ``Control`` at ``neighbor`` node path. A setter method for :ref:`focus_neighbour_bottom<class_Control_property_focus_neighbour_bottom>`, :ref:`focus_neighbour_left<class_Control_property_focus_neighbour_left>`, :ref:`focus_neighbour_right<class_Control_property_focus_neighbour_right>` and :ref:`focus_neighbour_top<class_Control_property_focus_neighbour_top>`.
|
|
Sets the anchor identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum to ``Control`` at ``neighbor`` node path. A setter method for :ref:`focus_neighbour_bottom<class_Control_property_focus_neighbour_bottom>`, :ref:`focus_neighbour_left<class_Control_property_focus_neighbour_left>`, :ref:`focus_neighbour_right<class_Control_property_focus_neighbour_right>` and :ref:`focus_neighbour_top<class_Control_property_focus_neighbour_top>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_global_position:
|
|
.. _class_Control_method_set_global_position:
|
|
|
|
|
|
|
|
- void **set_global_position** **(** :ref:`Vector2<class_Vector2>` position, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
- void **set_global_position** **(** :ref:`Vector2<class_Vector2>` position, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
@@ -1541,12 +1755,16 @@ Sets the :ref:`rect_global_position<class_Control_property_rect_global_position>
|
|
|
|
|
|
|
|
If ``keep_margins`` is ``true``, control's anchors will be updated instead of margins.
|
|
If ``keep_margins`` is ``true``, control's anchors will be updated instead of margins.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_margin:
|
|
.. _class_Control_method_set_margin:
|
|
|
|
|
|
|
|
- void **set_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` offset **)**
|
|
- void **set_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` offset **)**
|
|
|
|
|
|
|
|
Sets the margin identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum to given ``offset``. A setter method for :ref:`margin_bottom<class_Control_property_margin_bottom>`, :ref:`margin_left<class_Control_property_margin_left>`, :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_top<class_Control_property_margin_top>`.
|
|
Sets the margin identified by ``margin`` constant from :ref:`Margin<enum_@GlobalScope_Margin>` enum to given ``offset``. A setter method for :ref:`margin_bottom<class_Control_property_margin_bottom>`, :ref:`margin_left<class_Control_property_margin_left>`, :ref:`margin_right<class_Control_property_margin_right>` and :ref:`margin_top<class_Control_property_margin_top>`.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_margins_preset:
|
|
.. _class_Control_method_set_margins_preset:
|
|
|
|
|
|
|
|
- void **set_margins_preset** **(** :ref:`LayoutPreset<enum_Control_LayoutPreset>` preset, :ref:`LayoutPresetMode<enum_Control_LayoutPresetMode>` resize_mode=0, :ref:`int<class_int>` margin=0 **)**
|
|
- void **set_margins_preset** **(** :ref:`LayoutPreset<enum_Control_LayoutPreset>` preset, :ref:`LayoutPresetMode<enum_Control_LayoutPresetMode>` resize_mode=0, :ref:`int<class_int>` margin=0 **)**
|
|
@@ -1557,6 +1775,8 @@ Use parameter ``resize_mode`` with constants from :ref:`LayoutPresetMode<enum_Co
|
|
|
|
|
|
|
|
Use parameter ``margin`` to determine the gap between the ``Control`` and the edges.
|
|
Use parameter ``margin`` to determine the gap between the ``Control`` and the edges.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_position:
|
|
.. _class_Control_method_set_position:
|
|
|
|
|
|
|
|
- void **set_position** **(** :ref:`Vector2<class_Vector2>` position, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
- void **set_position** **(** :ref:`Vector2<class_Vector2>` position, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
@@ -1565,12 +1785,16 @@ Sets the :ref:`rect_position<class_Control_property_rect_position>` to given ``p
|
|
|
|
|
|
|
|
If ``keep_margins`` is ``true``, control's anchors will be updated instead of margins.
|
|
If ``keep_margins`` is ``true``, control's anchors will be updated instead of margins.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_rotation:
|
|
.. _class_Control_method_set_rotation:
|
|
|
|
|
|
|
|
- void **set_rotation** **(** :ref:`float<class_float>` radians **)**
|
|
- void **set_rotation** **(** :ref:`float<class_float>` radians **)**
|
|
|
|
|
|
|
|
Sets the rotation (in radians).
|
|
Sets the rotation (in radians).
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_set_size:
|
|
.. _class_Control_method_set_size:
|
|
|
|
|
|
|
|
- void **set_size** **(** :ref:`Vector2<class_Vector2>` size, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
- void **set_size** **(** :ref:`Vector2<class_Vector2>` size, :ref:`bool<class_bool>` keep_margins=false **)**
|
|
@@ -1579,6 +1803,8 @@ Sets the size (see :ref:`rect_size<class_Control_property_rect_size>`).
|
|
|
|
|
|
|
|
If ``keep_margins`` is ``true``, control's anchors will be updated instead of margins.
|
|
If ``keep_margins`` is ``true``, control's anchors will be updated instead of margins.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_show_modal:
|
|
.. _class_Control_method_show_modal:
|
|
|
|
|
|
|
|
- void **show_modal** **(** :ref:`bool<class_bool>` exclusive=false **)**
|
|
- void **show_modal** **(** :ref:`bool<class_bool>` exclusive=false **)**
|
|
@@ -1587,6 +1813,8 @@ Displays a control as modal. Control must be a subwindow. Modal controls capture
|
|
|
|
|
|
|
|
If ``exclusive`` is ``true``, other controls will not receive input and clicking outside this control will not close it.
|
|
If ``exclusive`` is ``true``, other controls will not receive input and clicking outside this control will not close it.
|
|
|
|
|
|
|
|
|
|
+----
|
|
|
|
|
+
|
|
|
.. _class_Control_method_warp_mouse:
|
|
.. _class_Control_method_warp_mouse:
|
|
|
|
|
|
|
|
- void **warp_mouse** **(** :ref:`Vector2<class_Vector2>` to_position **)**
|
|
- void **warp_mouse** **(** :ref:`Vector2<class_Vector2>` to_position **)**
|