Merge pull request #108647 from KoBeWi/docking_abyss

Make bottom panel into available dock slot
This commit is contained in:
Thaddeus Crews
2025-11-21 14:46:48 -06:00
30 changed files with 594 additions and 422 deletions

View File

@ -61,11 +61,22 @@
[/codeblock]
</description>
</method>
<method name="close">
<return type="void" />
<description>
Closes the dock, making its tab hidden.
</description>
</method>
<method name="open">
<return type="void" />
<description>
Opens the dock. It will appear in the last used dock slot. If the dock has no default slot, it will be opened floating.
</description>
</method>
</methods>
<members>
<member name="available_layouts" type="int" setter="set_available_layouts" getter="get_available_layouts" enum="EditorDock.DockLayout" is_bitfield="true" default="1">
The available layouts for this dock, as a bitmask.
If you want to make all layouts available, use [code]available_layouts = DOCK_LAYOUT_VERTICAL | DOCK_LAYOUT_HORIZONTAL[/code].
<member name="available_layouts" type="int" setter="set_available_layouts" getter="get_available_layouts" enum="EditorDock.DockLayout" is_bitfield="true" default="5">
The available layouts for this dock, as a bitmask. By default, the dock allows vertical and floating layouts.
</member>
<member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="default_slot" type="int" setter="set_default_slot" getter="get_default_slot" enum="EditorPlugin.DockSlot" default="-1">
@ -78,6 +89,9 @@
<member name="dock_shortcut" type="Shortcut" setter="set_dock_shortcut" getter="get_dock_shortcut">
The shortcut used to open the dock. This property can only be set before this dock is added via [method EditorPlugin.add_dock].
</member>
<member name="global" type="bool" setter="set_global" getter="is_global" default="true">
If [code]true[/code], the dock appears in the [b]Editor &gt; Editor Docks[/b] menu and can be closed. Non-global docks can still be closed using [method close].
</member>
<member name="icon_name" type="StringName" setter="set_icon_name" getter="get_icon_name" default="&amp;&quot;&quot;">
The icon for the dock, as a name from the [code]EditorIcons[/code] theme type in the editor theme. You can find the list of available icons [url=https://godot-editor-icons.github.io/]here[/url].
</member>
@ -87,14 +101,25 @@
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
The title of the dock's tab. If empty, the dock's [member Node.name] will be used. If the name is auto-generated (contains [code]@[/code]), the first child's name will be used instead.
</member>
<member name="title_color" type="Color" setter="set_title_color" getter="get_title_color" default="Color(0, 0, 0, 0)">
The color of the dock tab's title. If its alpha is [code]0.0[/code], the default font color will be used.
</member>
<member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
If [code]true[/code], the dock is not automatically opened or closed when loading an editor layout, only moved. It also can't be opened using a shortcut. This is meant for docks that are opened and closed in specific cases, such as when selecting a [TileMap] or [AnimationTree] node.
</member>
</members>
<constants>
<constant name="DOCK_LAYOUT_VERTICAL" value="1" enum="DockLayout" is_bitfield="true">
Allows placing the dock in the vertical dock slots on either side of the editor.
[b]Note:[/b] Currently this flag has no effect because the bottom panel is not a proper dock slot. This means that the dock can always be vertical.
</constant>
<constant name="DOCK_LAYOUT_HORIZONTAL" value="2" enum="DockLayout" is_bitfield="true">
Allows placing the dock in the editor's bottom panel. Implement [method _update_layout] to handle changing layouts.
Allows placing the dock in the editor's bottom panel.
</constant>
<constant name="DOCK_LAYOUT_FLOATING" value="4" enum="DockLayout" is_bitfield="true">
Allows making the dock floating (opened as a separate window).
</constant>
<constant name="DOCK_LAYOUT_ALL" value="7" enum="DockLayout" is_bitfield="true">
Allows placing the dock in all available slots.
</constant>
</constants>
</class>

View File

@ -424,7 +424,7 @@
[b]Note:[/b] A plugin instance can belong only to a single context menu slot.
</description>
</method>
<method name="add_control_to_bottom_panel">
<method name="add_control_to_bottom_panel" deprecated="Use [method add_dock] instead, with [member EditorDock.default_slot] set to [constant DOCK_SLOT_BOTTOM].">
<return type="Button" />
<param index="0" name="control" type="Control" />
<param index="1" name="title" type="String" />
@ -662,7 +662,7 @@
Removes the specified context menu plugin.
</description>
</method>
<method name="remove_control_from_bottom_panel">
<method name="remove_control_from_bottom_panel" deprecated="Use [method remove_dock] instead.">
<return type="void" />
<param index="0" name="control" type="Control" />
<description>
@ -910,7 +910,10 @@
<constant name="DOCK_SLOT_RIGHT_BR" value="7" enum="DockSlot">
Dock slot, right side, bottom-right (empty in default layout).
</constant>
<constant name="DOCK_SLOT_MAX" value="8" enum="DockSlot">
<constant name="DOCK_SLOT_BOTTOM" value="8" enum="DockSlot">
Bottom panel.
</constant>
<constant name="DOCK_SLOT_MAX" value="9" enum="DockSlot">
Represents the size of the [enum DockSlot] enum.
</constant>
<constant name="AFTER_GUI_INPUT_PASS" value="0" enum="AfterGUIInput">