Files
godot-docs/classes/class_buttongroup.rst
2016-11-19 14:32:56 +01:00

77 lines
3.4 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
.. _class_ButtonGroup:
ButtonGroup
===========
**Inherits:** :ref:`BoxContainer<class_boxcontainer>` **<** :ref:`Container<class_container>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Group of Buttons.
Member Functions
----------------
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_array>` | :ref:`get_button_list<class_ButtonGroup_get_button_list>` **(** **)** const |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| :ref:`BaseButton<class_basebutton>` | :ref:`get_focused_button<class_ButtonGroup_get_focused_button>` **(** **)** const |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| :ref:`BaseButton<class_basebutton>` | :ref:`get_pressed_button<class_ButtonGroup_get_pressed_button>` **(** **)** const |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_pressed_button_index<class_ButtonGroup_get_pressed_button_index>` **(** **)** const |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_pressed_button<class_ButtonGroup_set_pressed_button>` **(** :ref:`BaseButton<class_basebutton>` button **)** |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
Signals
-------
- **button_selected** **(** :ref:`Object<class_object>` button **)**
Description
-----------
Group of :ref:`Button<class_button>`. All direct and indirect children buttons become radios. Only one allows being pressed.
Member Function Description
---------------------------
.. _class_ButtonGroup_get_button_list:
- :ref:`Array<class_array>` **get_button_list** **(** **)** const
Return the list of all the buttons in the group.
.. _class_ButtonGroup_get_focused_button:
- :ref:`BaseButton<class_basebutton>` **get_focused_button** **(** **)** const
Return the focused button.
.. _class_ButtonGroup_get_pressed_button:
- :ref:`BaseButton<class_basebutton>` **get_pressed_button** **(** **)** const
Return the pressed button.
.. _class_ButtonGroup_get_pressed_button_index:
- :ref:`int<class_int>` **get_pressed_button_index** **(** **)** const
Return the index of the pressed button (by tree order).
.. _class_ButtonGroup_set_pressed_button:
- void **set_pressed_button** **(** :ref:`BaseButton<class_basebutton>` button **)**
Set the button to be pressed.