.. default-domain:: lua .. highlight:: lua .. currentmodule:: UI Panel ===== .. class:: Panel A container for user interface elements. See :meth:`UI.Canvas.add_panel`. .. attribute:: rect_transform: UI.RectTransform The rect transform for the panel. :Attribute: Read-only, cannot be set :rtype: :class:`UI.RectTransform` .. attribute:: visible: boolean Whether the UI object is visible. :Attribute: Can be read or written :rtype: boolean .. method:: add_panel([visible = True]) Create a panel within this panel. :param boolean visible: Whether the new panel is visible. :rtype: :class:`UI.Panel` .. method:: add_text(content, [visible = True]) Add text to the panel. :param string content: The text. :param boolean visible: Whether the text is visible. :rtype: :class:`UI.Text` .. method:: add_input_field([visible = True]) Add an input field to the panel. :param boolean visible: Whether the input field is visible. :rtype: :class:`UI.InputField` .. method:: add_button(content, [visible = True]) Add a button to the panel. :param string content: The label for the button. :param boolean visible: Whether the button is visible. :rtype: :class:`UI.Button` .. method:: remove() Remove the UI object.