From 3dc487b450a8c8db8e60deaa244f68737a4603ed Mon Sep 17 00:00:00 2001 From: Rindbee Date: Mon, 20 Mar 2023 12:55:04 +0800 Subject: [PATCH] Add instructions for configuring CheckBox as a radio button --- doc/classes/BaseButton.xml | 1 + doc/classes/ButtonGroup.xml | 2 +- doc/classes/CheckBox.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index d7f559498d5..a934e1544a4 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -49,6 +49,7 @@ 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. Binary mask to choose which mouse buttons this button will respond to. diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 670296fd45a..3e153ea1aaf 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -4,7 +4,7 @@ Group of Buttons. - 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]. diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 9d98a1c1ed4..699073f9d33 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -6,6 +6,7 @@ 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].