class_buttongroup.rst 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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. Group of Buttons.
  10. Description
  11. -----------
  12. Group of :ref:`Button<class_Button>`. All direct and indirect children buttons become radios. Only one allows being pressed.
  13. :ref:`BaseButton.toggle_mode<class_BaseButton_property_toggle_mode>` should be ``true``.
  14. Properties
  15. ----------
  16. +-------------------------+-------------------------+------------------------------+
  17. | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` *(parent override)* |
  18. +-------------------------+-------------------------+------------------------------+
  19. Methods
  20. -------
  21. +-------------------------------------+------------------------------------------------------------------------------------+
  22. | :ref:`Array<class_Array>` | :ref:`get_buttons<class_ButtonGroup_method_get_buttons>` **(** **)** |
  23. +-------------------------------------+------------------------------------------------------------------------------------+
  24. | :ref:`BaseButton<class_BaseButton>` | :ref:`get_pressed_button<class_ButtonGroup_method_get_pressed_button>` **(** **)** |
  25. +-------------------------------------+------------------------------------------------------------------------------------+
  26. Signals
  27. -------
  28. .. _class_ButtonGroup_signal_pressed:
  29. - **pressed** **(** :ref:`Object<class_Object>` button **)**
  30. Emitted when one of the buttons of the group is pressed.
  31. Method Descriptions
  32. -------------------
  33. .. _class_ButtonGroup_method_get_buttons:
  34. - :ref:`Array<class_Array>` **get_buttons** **(** **)**
  35. 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>`).
  36. ----
  37. .. _class_ButtonGroup_method_get_pressed_button:
  38. - :ref:`BaseButton<class_BaseButton>` **get_pressed_button** **(** **)**
  39. Returns the current pressed button.
  40. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  41. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  42. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`