class_buttongroup.rst 1.8 KB

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