Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Guide to the Godot game engine/Plugins/Making your first plugin/Docks

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Plugins/Making your first plugin/Bottom panels Plugins/Making your first plugin/Menus Bottom panels Menus Dock A dock is a side panel. Examples are Inspector and Scene. First, to create a bottom panel, you need to make a UI for it: Create a scene and choose User Interface, and rename the root Control node to dock. Save it inside your plugin folder, in the same place as the plugin script, under the name "dock.tscn". Select your Control, press Layout from the top of the screen, and press Full Rect from the drop down menu that appears. With the Control still selected, expand Rect in the Inspector and change min_size.x to 60 (or some larger value) to ensure your UI appears with a non zero size. Create the main UI as a child of the VBoxContainer. Now, open your plugin's main script, and type the following code: expands Control var dock: Control func _enter_tree(): # Put any load logic here, including adding new project settings dock = preload("dock.tscn").instance() func _exit_tree(): # Put exit tree logic here, including any saving remove_control_from_bottom_panel(dock) dock.queue_free() <noinclude> Plugins/Making your first plugin/Bottom panels Plugins/Making your first plugin/Menus