Merge pull request #75134 from Rindbee/configured-as-a-radio-button

Add instructions for configuring CheckBox as a radio button
This commit is contained in:
Yuri Sizov 2023-03-21 12:15:54 +01:00 committed by GitHub
commit ed13a52f94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -49,6 +49,7 @@
</member>
<member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
The [ButtonGroup] associated with the button. Not to be confused with node groups.
[b]Note:[/b] The button will be configured as a radio button if a [ButtonGroup] is assigned to it.
</member>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="1">
Binary mask to choose which mouse buttons this button will respond to.

View file

@ -4,7 +4,7 @@
Group of Buttons.
</brief_description>
<description>
Group of [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.
Group of [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. Some types of buttons (such as [CheckBox]) may have a special appearance for this state.
Every member of the ButtonGroup should have [member BaseButton.toggle_mode] set to [code]true[/code].
</description>
<tutorials>

View file

@ -6,6 +6,7 @@
<description>
A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed.
See also [BaseButton] which contains common properties and methods associated with this node.
[b]Note:[/b] CheckBox changes its appearance when it's configured as a radio button. See various [code]radio_*[/code] theme properties. To configure CheckBox to act as a radio button, use [member BaseButton.button_group] and [ButtonGroup].
</description>
<tutorials>
</tutorials>