Browse Source

fix 'making_plugin' tutorial code snippet (#5585)

* Fix making plugin tutorial
Bruno Garcia 3 years ago
parent
commit
1381983226
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tutorials/plugins/editor/making_plugins.rst

+ 3 - 3
tutorials/plugins/editor/making_plugins.rst

@@ -161,7 +161,7 @@ clicked. For that, we'll need a script that extends from
 
 
 
 
     func _enter_tree():
     func _enter_tree():
-        connect("pressed", self, "clicked")
+        pressed.connect(clicked)
 
 
 
 
     func clicked():
     func clicked():
@@ -177,10 +177,10 @@ clicked. For that, we'll need a script that extends from
     {
     {
         public override void _EnterTree()
         public override void _EnterTree()
         {
         {
-            Connect("pressed", this, "clicked");
+            Connect("pressed", Clicked);
         }
         }
 
 
-        public void clicked()
+        public void Clicked()
         {
         {
             GD.Print("You clicked me!");
             GD.Print("You clicked me!");
         }
         }