Skip to content

A container that arranges its child controls in the shape of a pyramid.

License

Notifications You must be signed in to change notification settings

njamster/pyramid_container

Repository files navigation

PyramidContainer

A container that arranges its child controls in the shape of a pyramid. That is, the <biggest included power of two> nodes will form the base layer, with the amount of nodes on each subsequent layer being halfed, until all nodes have been assigned:

Image that visualizes how the space inside the container gets distributed between 15 nodes: 8 nodes on the first layer, 4 on the second, 2 on the third, and one on the last

While there might be further applications, this container was primarily developed to draw tournament brackets. That's why it includes code to automatically draw lines that connect two nodes in one layer to one node in the following layer:

Screenshot of a tournament bracket for 8 participants (using the same amount of nodes as the image above) where the connection lines were automaticly added) inside the container, and the automaticly drawn connection lines between those nodes

Demo

A recording of the demo scene included in this repo, showcasing various features of the PyramidContainer in action

The demo shown in the GIF above is included in this repo here.

Documentation

Once the plugin has been enabled in the Project Settings, its documentation can be accessed directly from Godot: press F1, then search for "PyramidContainer".

About

A container that arranges its child controls in the shape of a pyramid.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published