summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-10 22:13:28 +0100
committerGitHub <noreply@github.com>2022-02-10 22:13:28 +0100
commit69ddf2fd05dccbb2e802e72392f701a881eaca78 (patch)
tree4e1e60819b6062bf268f3c0c69128c083d5804a4 /doc
parent2362c5806773aca4a728a3f50a9de0f568bdac73 (diff)
parent107b6f299cda3f8b63432930f19cdd9bc24fb6dc (diff)
Merge pull request #55157 from pycbouh/control-inspector-reorg
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Container.xml14
-rw-r--r--doc/classes/Control.xml12
2 files changed, 22 insertions, 4 deletions
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 83655425fc..076a800e29 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -10,6 +10,20 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
+ </description>
+ </method>
+ <method name="_get_allowed_size_flags_vertical" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
+ </description>
+ </method>
<method name="fit_child_in_rect">
<return type="void" />
<argument index="0" name="child" type="Control" />
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index b6c2dac33c..f2d727bb51 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1278,20 +1278,24 @@
<constant name="PRESET_MODE_KEEP_SIZE" value="3" enum="LayoutPresetMode">
The control's size will not change.
</constant>
+ <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags">
+ Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ [b]Note:[/b] Setting this flag is equal to not having any size flags.
+ </constant>
<constant name="SIZE_FILL" value="1" enum="SizeFlags">
- Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="SIZE_EXPAND" value="2" enum="SizeFlags">
Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags">
- Sets the node's size flags to both fill and expand. See the 2 constants above for more information.
+ Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information.
</constant>
<constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags">
- Tells the parent [Container] to center the node in itself. It centers the control based on its bounding box, so it doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags">
- Tells the parent [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 [member size_flags_horizontal] and [member size_flags_vertical].
+ Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter">
The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls.