From c33373b80a3877a8863b6131731b826e48b8b8ab Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 23 Sep 2020 23:34:28 +0200 Subject: [PATCH] Reference the BaseButton class explicitly in button class documentations Users are sometimes confused as to the `pressed` property not being visible in the Button class documentation. This is because `pressed` is defined in BaseButton. (cherry picked from commit 038baede5a7c882e36cafbe3ad75611849e68c47) --- doc/classes/Button.xml | 1 + doc/classes/CheckBox.xml | 1 + doc/classes/CheckButton.xml | 1 + doc/classes/ColorPickerButton.xml | 1 + doc/classes/LinkButton.xml | 1 + doc/classes/MenuButton.xml | 1 + doc/classes/OptionButton.xml | 1 + doc/classes/TextureButton.xml | 1 + 8 files changed, 8 insertions(+) diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index ede9c387c92..30414ee9e54 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -17,6 +17,7 @@ print("Hello world!") [/codeblock] Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. + See also [BaseButton] which contains common properties and methods associated with this node. diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index b61c7d2d0bd..00e52e7ab77 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -5,6 +5,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 instance, it should 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. diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index e24d5a1784c..3a0889cd0fb 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -5,6 +5,7 @@ CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button. + See also [BaseButton] which contains common properties and methods associated with this node. diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 7fcd47f875d..9a76678d062 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -5,6 +5,7 @@ Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility. + See also [BaseButton] which contains common properties and methods associated with this node. diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 6ad354587f7..8716eb3cf9d 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -5,6 +5,7 @@ This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). + See also [BaseButton] which contains common properties and methods associated with this node. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 8395cef8147..84878aff0a6 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -6,6 +6,7 @@ Special button that brings up a [PopupMenu] when clicked. New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties. + See also [BaseButton] which contains common properties and methods associated with this node. diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 170d524aebb..3ccab47c640 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -5,6 +5,7 @@ OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. + See also [BaseButton] which contains common properties and methods associated with this node. diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index cd63fd8c872..04bce92f356 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -6,6 +6,7 @@ [TextureButton] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex [Control]s. The "normal" state must contain a texture ([member texture_normal]); other textures are optional. + See also [BaseButton] which contains common properties and methods associated with this node.