Panel

class Panel

A container for user interface elements. See Canvas::add_panel().

RectTransform rect_transform()

The rect transform for the panel.

bool visible()
void set_visible(bool value)

Whether the UI object is visible.

Panel add_panel(bool visible = true)

Create a panel within this panel.

Parameters:
  • visible – Whether the new panel is visible.

Text add_text(std::string content, bool visible = true)

Add text to the panel.

Parameters:
  • content – The text.

  • visible – Whether the text is visible.

InputField add_input_field(bool visible = true)

Add an input field to the panel.

Parameters:
  • visible – Whether the input field is visible.

Button add_button(std::string content, bool visible = true)

Add a button to the panel.

Parameters:
  • content – The label for the button.

  • visible – Whether the button is visible.

void remove()

Remove the UI object.