diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-21 18:28:45 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-28 14:24:09 +0100 |
commit | 01afc442c73661df677c2b93f4037a21992ee45b (patch) | |
tree | 9a5b0b68cb022873ba31929fe6a785ddf5c0555c /modules/gdnavigation | |
parent | a439131c2b06b3d452e5be13530b6d2caa72c1aa (diff) |
Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.
No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
Diffstat (limited to 'modules/gdnavigation')
-rw-r--r-- | modules/gdnavigation/navigation_mesh_editor_plugin.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp index 4ab90ac7eb..5c298ae9e4 100644 --- a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp +++ b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp @@ -94,9 +94,6 @@ void NavigationMeshEditor::edit(NavigationRegion *p_nav_mesh_instance) { } void NavigationMeshEditor::_bind_methods() { - - ClassDB::bind_method("_bake_pressed", &NavigationMeshEditor::_bake_pressed); - ClassDB::bind_method("_clear_pressed", &NavigationMeshEditor::_clear_pressed); } NavigationMeshEditor::NavigationMeshEditor() { @@ -107,13 +104,13 @@ NavigationMeshEditor::NavigationMeshEditor() { bake_hbox->add_child(button_bake); button_bake->set_toggle_mode(true); button_bake->set_text(TTR("Bake NavMesh")); - button_bake->connect_compat("pressed", this, "_bake_pressed"); + button_bake->connect("pressed", callable_mp(this, &NavigationMeshEditor::_bake_pressed)); button_reset = memnew(ToolButton); bake_hbox->add_child(button_reset); // No button text, we only use a revert icon which is set when entering the tree. button_reset->set_tooltip(TTR("Clear the navigation mesh.")); - button_reset->connect_compat("pressed", this, "_clear_pressed"); + button_reset->connect("pressed", callable_mp(this, &NavigationMeshEditor::_clear_pressed)); bake_info = memnew(Label); bake_hbox->add_child(bake_info); |