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

Bottom panels
A bottom panel is a button at the bottom of the screen that shows a dock when clicked. Examples are,   and.

First, to create a bottom panel, you need to make a UI for it:
 * 1) Create a scene and choose, and rename the root Control node to.
 * 2) Save it inside your plugin folder, in the same place as the plugin script, under the name "bottom_panel.tscn".
 * 3) Select your Control, press  from the top of the screen, and press   from the drop down menu that appears.
 * 4) With the Control still selected, expand  in the Inspector and change   to 50 (or some larger value) to ensure your UI appears with a non zero size.
 * 5) Add a as a child of the bottom panel. Set its layout to.
 * 6) Add a, and give it text suitable to what the UI does.
 * 7) Add a as a child of the VBoxContainer.
 * 8) Make sure the Panel is selected, and go to  on the inspector, and check   for both horizontal and vertical.
 * 9) Create the main UI as a child of the VBoxContainer.

You may wish to put the top Label in a (which is in the VBoxContainer) if you want to also put buttons on the top.

You also may want to use containers more than you would for a game. You may often want to stretch or shrink the bottom panel to be larger or smaller than the default small size. Setting a  to 200 - 250 will also stop you from shrinking it too much and making the main screen invisible while the panel is open.

Now, open your plugin's main script, and type the following code:

bp: bp_button: :  bp =. bp_button = (bp, ) :  (bp) bp.

You may hide or show the button whenever you need too, by using.