summaryrefslogtreecommitdiff
path: root/doc/classes/BaseButton.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/BaseButton.xml')
-rw-r--r--doc/classes/BaseButton.xml34
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index c65d545f3e..f306adced2 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -29,49 +29,49 @@
<return type="int" enum="BaseButton.DrawMode">
</return>
<description>
- Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
+ Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [code]DRAW_*[/code] enum.
</description>
</method>
<method name="is_hovered" qualifiers="const">
<return type="bool">
</return>
<description>
- Return [code]true[/code] if the mouse has entered the button and has not left it yet.
+ Returns [code]true[/code] if the mouse has entered the button and has not left it yet.
</description>
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
- Determines when the button is considered clicked, one of the ACTION_MODE_* constants.
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1">
+ Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants.
</member>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT[/code].
</member>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
</member>
- <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode">
+ <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode" default="2">
Focus access mode to use when switching between enabled/disabled (see [member Control.focus_mode] and [member disabled]).
</member>
- <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
+ <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group" default="null">
[ButtonGroup] associated to the button.
</member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
+ If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
</member>
- <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
+ <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut" default="null">
[ShortCut] associated to the button.
</member>
- <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled">
+ <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true">
If [code]true[/code], the button will add information about its shortcut in the tooltip.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode">
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false">
If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
</member>
- <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside">
- If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. Default value: [code]false[/code].
- </member>
</members>
<signals>
<signal name="button_down">
@@ -86,14 +86,14 @@
</signal>
<signal name="pressed">
<description>
- This signal is emitted every time the button is toggled or pressed (i.e. activated, so on [code]button_down[/code] if "Click on press" is active and on [code]button_up[/code] otherwise).
+ Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise.
</description>
</signal>
<signal name="toggled">
<argument index="0" name="button_pressed" type="bool">
</argument>
<description>
- This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]button_pressed[/i] argument.
+ Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [code]button_pressed[/code] argument.
</description>
</signal>
</signals>