class_buttongroup.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ButtonGroup.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ButtonGroup:
  5. ButtonGroup
  6. ===========
  7. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Group of Buttons.
  12. Methods
  13. -------
  14. +-------------------------------------+------------------------------------------------------------------------------------+
  15. | :ref:`Array<class_Array>` | :ref:`get_buttons<class_ButtonGroup_method_get_buttons>` **(** **)** |
  16. +-------------------------------------+------------------------------------------------------------------------------------+
  17. | :ref:`BaseButton<class_BaseButton>` | :ref:`get_pressed_button<class_ButtonGroup_method_get_pressed_button>` **(** **)** |
  18. +-------------------------------------+------------------------------------------------------------------------------------+
  19. Description
  20. -----------
  21. Group of :ref:`Button<class_Button>`. All direct and indirect children buttons become radios. Only one allows being pressed.
  22. :ref:`BaseButton.toggle_mode<class_BaseButton_property_toggle_mode>` should be ``true``.
  23. Method Descriptions
  24. -------------------
  25. .. _class_ButtonGroup_method_get_buttons:
  26. - :ref:`Array<class_Array>` **get_buttons** **(** **)**
  27. Returns an :ref:`Array<class_Array>` of :ref:`Button<class_Button>`\ s who have this as their ``ButtonGroup`` (see :ref:`BaseButton.group<class_BaseButton_property_group>`).
  28. .. _class_ButtonGroup_method_get_pressed_button:
  29. - :ref:`BaseButton<class_BaseButton>` **get_pressed_button** **(** **)**
  30. Returns the current pressed button.