mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (6c05ec3)
This commit is contained in:
@@ -23,7 +23,7 @@ Description
|
||||
|
||||
**Button** is the standard themed button. It can contain text and an icon, and it will display them according to the current :ref:`Theme<class_Theme>`.
|
||||
|
||||
\ **Example of creating a button and assigning an action when pressed by code:**\
|
||||
\ **Example:** Create a button and connect a method that will be called when the button is pressed:
|
||||
|
||||
|
||||
.. tabs::
|
||||
@@ -33,7 +33,7 @@ Description
|
||||
func _ready():
|
||||
var button = Button.new()
|
||||
button.text = "Click me"
|
||||
button.pressed.connect(self._button_pressed)
|
||||
button.pressed.connect(_button_pressed)
|
||||
add_child(button)
|
||||
|
||||
func _button_pressed():
|
||||
@@ -58,7 +58,7 @@ Description
|
||||
|
||||
See also :ref:`BaseButton<class_BaseButton>` which contains common properties and methods associated with this node.
|
||||
|
||||
\ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton<class_TouchScreenButton>` for buttons that trigger gameplay movement or actions.
|
||||
\ **Note:** Buttons do not detect touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton<class_TouchScreenButton>` for buttons that trigger gameplay movement or actions.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
@@ -144,6 +144,8 @@ Theme Properties
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`icon_max_width<class_Button_theme_constant_icon_max_width>` | ``0`` |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`line_spacing<class_Button_theme_constant_line_spacing>` | ``0`` |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`outline_size<class_Button_theme_constant_outline_size>` | ``0`` |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+
|
||||
| :ref:`Font<class_Font>` | :ref:`font<class_Button_theme_font_font>` | |
|
||||
@@ -587,6 +589,18 @@ The maximum allowed width of the **Button**'s icon. This limit is applied on top
|
||||
|
||||
----
|
||||
|
||||
.. _class_Button_theme_constant_line_spacing:
|
||||
|
||||
.. rst-class:: classref-themeproperty
|
||||
|
||||
:ref:`int<class_int>` **line_spacing** = ``0`` :ref:`🔗<class_Button_theme_constant_line_spacing>`
|
||||
|
||||
Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Button_theme_constant_outline_size:
|
||||
|
||||
.. rst-class:: classref-themeproperty
|
||||
|
||||
Reference in New Issue
Block a user