.. default-domain:: py .. highlight:: py .. currentmodule:: UI Button ====== .. class:: Button A text label. See :meth:`Panel.add_button`. .. attribute:: rect_transform The rect transform for the text. :Attribute: Read-only, cannot be set :rtype: :class:`RectTransform` .. attribute:: visible Whether the UI object is visible. :Attribute: Can be read or written :rtype: bool .. attribute:: text The text for the button. :Attribute: Read-only, cannot be set :rtype: :class:`Text` .. attribute:: clicked Whether the button has been clicked. :Attribute: Can be read or written :rtype: bool .. 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.