Skip to main content

ControlPanel

The ControlPanel class is a container UI control derived from ControlRect that arranges child controls in a structured, grid-based layout. It allows customization of the number of columns, spacing between elements, and the relative width of each column using column ratios. As a rectangular control, it inherits visual styling options such as background color, radius, and texture support, making it suitable for organizing and grouping controls within a visually distinct section of a user interface.

#include <interface/TellusimControls.h>

Inheritance

Constructors

ControlPanel()
explicit ControlPanel(Control *parent)
ControlPanel(Control *parent, uint32_t columns)
ControlPanel(Control *parent, uint32_t columns, float32_t x, float32_t y)

Methods

Number of columns.

void setColumns(uint32_t columns)
uint32_t getColumns() const

Grid spacing.

void setSpacing(Vector2f spacing)
void setSpacing(float32_t x, float32_t y)
const Vector2f getSpacing() const

Grid column ratio.

void setColumnRatio(uint32_t index, float32_t ratio)
float32_t getColumnRatio(uint32_t index) const

Controls size.

const Vector2f getControlsSize() const