summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnutrix <numaanzaheerahmed@yahoo.com>2022-10-30 05:26:46 +0530
committerAnutrix <numaanzaheerahmed@yahoo.com>2022-10-30 05:26:46 +0530
commit7984598e3386fee7d40e3fc18904e73cdf0ff366 (patch)
tree57bb10b6426be89ef8aff3f6ebc7793bd2274cf4 /doc
parent11d74d606a442d27b060a1c3cb292a8da715ce68 (diff)
Fixed signal connection examples to use new callable syntax in the docs
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Button.xml4
-rw-r--r--doc/classes/ConfirmationDialog.xml4
-rw-r--r--doc/classes/Expression.xml4
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index e78cdfc951..1ff51b48be 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -11,7 +11,7 @@
func _ready():
var button = Button.new()
button.text = "Click me"
- button.connect("pressed", self, "_button_pressed")
+ button.pressed.connect(self._button_pressed)
add_child(button)
func _button_pressed():
@@ -22,7 +22,7 @@
{
var button = new Button();
button.Text = "Click me";
- button.Connect("pressed", this, nameof(ButtonPressed));
+ button.Pressed += ButtonPressed;
AddChild(button);
}
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index d4c503857d..48b4df9126 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -8,10 +8,10 @@
To get cancel action, you can use:
[codeblocks]
[gdscript]
- get_cancel().connect("pressed", self, "cancelled")
+ get_cancel_button().pressed.connect(self.cancelled)
[/gdscript]
[csharp]
- GetCancel().Connect("pressed", this, nameof(Cancelled));
+ GetCancelButton().Pressed += Cancelled;
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index 3a397f56a9..4670e0c382 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -12,7 +12,7 @@
var expression = Expression.new()
func _ready():
- $LineEdit.connect("text_submitted", self, "_on_text_submitted")
+ $LineEdit.text_submitted.connect(self._on_text_submitted)
func _on_text_submitted(command):
var error = expression.parse(command)
@@ -28,7 +28,7 @@
public override void _Ready()
{
- GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered));
+ GetNode("LineEdit").TextSubmitted += OnTextEntered;
}
private void OnTextEntered(string command)