mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Clean up more [b]Example:[/b] lines from the class reference
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
[Button] is the standard themed button. It can contain text and an icon, and it will display them according to the current [Theme].
|
||||
[b]Example of creating a button and assigning an action when pressed by code:[/b]
|
||||
[b]Example:[/b] Create a button and connect a method that will be called when the button is pressed:
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
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():
|
||||
@@ -33,7 +33,7 @@
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
See also [BaseButton] which contains common properties and methods associated with this node.
|
||||
[b]Note:[/b] 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 [TouchScreenButton] for buttons that trigger gameplay movement or actions.
|
||||
[b]Note:[/b] 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 [TouchScreenButton] for buttons that trigger gameplay movement or actions.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/2712</link>
|
||||
|
||||
Reference in New Issue
Block a user