Sfoglia il codice sorgente

Fix C# connect signal for 3.x (#5865)

Raul Santos 3 anni fa
parent
commit
aabf272db4
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      tutorials/plugins/editor/inspector_plugins.rst

+ 1 - 1
tutorials/plugins/editor/inspector_plugins.rst

@@ -264,7 +264,7 @@ followed by ``set_bottom_editor()`` to position it below the name.
             AddFocusable(_propertyControl);
             AddFocusable(_propertyControl);
             // Setup the initial state and connect to the signal to track changes.
             // Setup the initial state and connect to the signal to track changes.
             RefreshControlText();
             RefreshControlText();
-            _propertyControl.Pressed += OnButtonPressed;
+            _propertyControl.Connect("pressed", this, nameof(OnButtonPressed));
         }
         }
 
 
         private void OnButtonPressed()
         private void OnButtonPressed()