.. default-domain:: lua .. highlight:: lua .. currentmodule:: UI Button ====== .. class:: Button A text label. See :meth:`UI.Panel.add_button`. .. attribute:: rect_transform: UI.RectTransform The rect transform for the text. :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 .. attribute:: text: UI.Text The text for the button. :Attribute: Read-only, cannot be set :rtype: :class:`UI.Text` .. attribute:: clicked: boolean Whether the button has been clicked. :Attribute: Can be read or written :rtype: boolean .. note:: This property is set to true when the user clicks the button. A client script should reset the property to false in order to detect subsequent button presses. .. method:: remove() Remove the UI object.