0.2.0-dev Download ZIP
40 lines ·1.7 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="ButtonGroup" inherits="Resource" api_type="core" keywords="radio" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A group of buttons that doesn't allow more than one button to be pressed at a time. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | 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. |
| 8 | Every member of a [ButtonGroup] should have [member BaseButton.toggle_mode] set to [code]true[/code]. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="get_buttons"> |
| 14 | <return type="BaseButton[]" /> |
| 15 | <description> |
| 16 | Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]). |
| 17 | </description> |
| 18 | </method> |
| 19 | <method name="get_pressed_button"> |
| 20 | <return type="BaseButton" /> |
| 21 | <description> |
| 22 | Returns the current pressed button. |
| 23 | </description> |
| 24 | </method> |
| 25 | </methods> |
| 26 | <members> |
| 27 | <member name="allow_unpress" type="bool" setter="set_allow_unpress" getter="is_allow_unpress" default="false"> |
| 28 | If [code]true[/code], it is possible to unpress all buttons in this [ButtonGroup]. |
| 29 | </member> |
| 30 | <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" /> |
| 31 | </members> |
| 32 | <signals> |
| 33 | <signal name="pressed"> |
| 34 | <param index="0" name="button" type="BaseButton" /> |
| 35 | <description> |
| 36 | Emitted when one of the buttons of the group is pressed. |
| 37 | </description> |
| 38 | </signal> |
| 39 | </signals> |
| 40 | </class> |