class_buttongroup.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ButtonGroup.xml.
  6. .. _class_ButtonGroup:
  7. ButtonGroup
  8. ===========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Group of Buttons.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Group of :ref:`BaseButton<class_BaseButton>`. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time.
  15. Every member of the ButtonGroup should have :ref:`BaseButton.toggle_mode<class_BaseButton_property_toggle_mode>` set to ``true``.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-------------------------+-------------------------+---------------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
  23. +-------------------------+-------------------------+---------------------------------------------------------------------------------------+
  24. .. rst-class:: classref-reftable-group
  25. Methods
  26. -------
  27. .. table::
  28. :widths: auto
  29. +---------------------------------------+------------------------------------------------------------------------------------+
  30. | :ref:`BaseButton[]<class_BaseButton>` | :ref:`get_buttons<class_ButtonGroup_method_get_buttons>` **(** **)** |
  31. +---------------------------------------+------------------------------------------------------------------------------------+
  32. | :ref:`BaseButton<class_BaseButton>` | :ref:`get_pressed_button<class_ButtonGroup_method_get_pressed_button>` **(** **)** |
  33. +---------------------------------------+------------------------------------------------------------------------------------+
  34. .. rst-class:: classref-section-separator
  35. ----
  36. .. rst-class:: classref-descriptions-group
  37. Signals
  38. -------
  39. .. _class_ButtonGroup_signal_pressed:
  40. .. rst-class:: classref-signal
  41. **pressed** **(** :ref:`BaseButton<class_BaseButton>` button **)**
  42. Emitted when one of the buttons of the group is pressed.
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Method Descriptions
  47. -------------------
  48. .. _class_ButtonGroup_method_get_buttons:
  49. .. rst-class:: classref-method
  50. :ref:`BaseButton[]<class_BaseButton>` **get_buttons** **(** **)**
  51. Returns an :ref:`Array<class_Array>` of :ref:`Button<class_Button>`\ s who have this as their **ButtonGroup** (see :ref:`BaseButton.button_group<class_BaseButton_property_button_group>`).
  52. .. rst-class:: classref-item-separator
  53. ----
  54. .. _class_ButtonGroup_method_get_pressed_button:
  55. .. rst-class:: classref-method
  56. :ref:`BaseButton<class_BaseButton>` **get_pressed_button** **(** **)**
  57. Returns the current pressed button.
  58. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  59. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  60. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  61. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  62. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  63. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`