2
0

class_buttongroup.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. .. _class_ButtonGroup:
  2. ButtonGroup
  3. ===========
  4. **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>`
  5. **Category:** Core
  6. Brief Description
  7. -----------------
  8. Group of Buttons.
  9. Member Functions
  10. ----------------
  11. +--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  12. | :ref:`BaseButton<class_basebutton>` | :ref:`get_pressed_button<class_ButtonGroup_get_pressed_button>` **(** **)** const |
  13. +--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`int<class_int>` | :ref:`get_pressed_button_index<class_ButtonGroup_get_pressed_button_index>` **(** **)** const |
  15. +--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`BaseButton<class_basebutton>` | :ref:`get_focused_button<class_ButtonGroup_get_focused_button>` **(** **)** const |
  17. +--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`Array<class_array>` | :ref:`get_button_list<class_ButtonGroup_get_button_list>` **(** **)** const |
  19. +--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_pressed_button<class_ButtonGroup_set_pressed_button>` **(** :ref:`BaseButton<class_basebutton>` button **)** |
  21. +--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  22. Description
  23. -----------
  24. Group of :ref:`Button<class_button>`. All direct and indirect children buttons become radios. Only one allows being pressed.
  25. Member Function Description
  26. ---------------------------
  27. .. _class_ButtonGroup_get_pressed_button:
  28. - :ref:`BaseButton<class_basebutton>` **get_pressed_button** **(** **)** const
  29. Return the pressed button.
  30. .. _class_ButtonGroup_get_pressed_button_index:
  31. - :ref:`int<class_int>` **get_pressed_button_index** **(** **)** const
  32. Return the index of the pressed button (by tree order).
  33. .. _class_ButtonGroup_get_focused_button:
  34. - :ref:`BaseButton<class_basebutton>` **get_focused_button** **(** **)** const
  35. Return the focused button.
  36. .. _class_ButtonGroup_get_button_list:
  37. - :ref:`Array<class_array>` **get_button_list** **(** **)** const
  38. Return the list of all the buttons in the group.
  39. .. _class_ButtonGroup_set_pressed_button:
  40. - void **set_pressed_button** **(** :ref:`BaseButton<class_basebutton>` button **)**
  41. Set the button to be pressed.