godot/doc/classes/ButtonGroup.xml
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00

41 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="ButtonGroup" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A group of buttons that doesn't allow more than one button to be pressed at a time.
</brief_description>
<description>
A group of [BaseButton]-derived buttons. The buttons in a [ButtonGroup] are treated like radio buttons: No more than one button can be pressed at a time. Some types of buttons (such as [CheckBox]) may have a special appearance in this state.
Every member of a [ButtonGroup] should have [member BaseButton.toggle_mode] set to [code]true[/code].
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_buttons">
<return type="BaseButton[]" />
<description>
Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]).
</description>
</method>
<method name="get_pressed_button">
<return type="BaseButton" />
<description>
Returns the current pressed button.
</description>
</method>
</methods>
<members>
<member name="allow_unpress" type="bool" setter="set_allow_unpress" getter="is_allow_unpress" default="false">
If [code]true[/code], it is possible to unpress all buttons in this [ButtonGroup].
</member>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
<signals>
<signal name="pressed">
<param index="0" name="button" type="BaseButton" />
<description>
Emitted when one of the buttons of the group is pressed.
</description>
</signal>
</signals>
</class>