Skip to content

Layouts

Quetzy edited this page Jul 8, 2021 · 1 revision

Layouts are what determines how a panel positions its child elements within the available space. Some layouts have additional properties that modify how they behave.

These are the available layouts:

  • vertical
    This is the default layout and will simply arrange elements vertically from top to bottom.

  • horizontal
    This layout will arrange elements horizontally from left to right.

  • grid
    With this layout you can specify a number of rows and columns and the elements will be positioned aligned to the grid, starting horizontally left-to-right and then wrapping to the next grid row as needed.

  • canvas
    Canvas allows you to position elements relative to the edges of the panel space, for example you could position an element 50 pixels from the bottom edge and 10 pixels from the right edge. This layout is great for creating a HUD type UI.

  • overlay
    This layout will stack elements right on top of each other, with the first element being at the bottom of the stack. This can be useful if you want to stack some content on top of a background image or two.