Panel¶
- class UI.Panel¶
A container for user interface elements. See
UI.Canvas.add_panel()
.- rect_transform: UI.RectTransform¶
The rect transform for the panel.
- Attribute:
Read-only, cannot be set
- Return type:
- visible: boolean¶
Whether the UI object is visible.
- Attribute:
Can be read or written
- Return type:
boolean
- add_panel([visible = True])¶
Create a panel within this panel.
- Parameters:
visible (
boolean
) – Whether the new panel is visible.- Return type:
- add_text(content[, visible = True])¶
Add text to the panel.
- Parameters:
content (
string
) – The text.visible (
boolean
) – Whether the text is visible.
- Return type:
- add_input_field([visible = True])¶
Add an input field to the panel.
- Parameters:
visible (
boolean
) – Whether the input field is visible.- Return type:
- add_button(content[, visible = True])¶
Add a button to the panel.
- Parameters:
content (
string
) – The label for the button.visible (
boolean
) – Whether the button is visible.
- Return type:
- remove()¶
Remove the UI object.