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/visual_script/visual_script_property_selector.cpp | |
parent | a439131c2b06b3d452e5be13530b6d2caa72c1aa (diff) | |
download | redot-engine-01afc442c73661df677c2b93f4037a21992ee45b.tar.gz |
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/visual_script/visual_script_property_selector.cpp')
-rw-r--r-- | modules/visual_script/visual_script_property_selector.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index 20bad364dc..f8b8a9f00b 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -522,7 +522,7 @@ void VisualScriptPropertySelector::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - connect_compat("confirmed", this, "_confirmed"); + connect("confirmed", callable_mp(this, &VisualScriptPropertySelector::_confirmed)); } } @@ -690,11 +690,6 @@ void VisualScriptPropertySelector::show_window(float p_screen_ratio) { void VisualScriptPropertySelector::_bind_methods() { - ClassDB::bind_method(D_METHOD("_text_changed"), &VisualScriptPropertySelector::_text_changed); - ClassDB::bind_method(D_METHOD("_confirmed"), &VisualScriptPropertySelector::_confirmed); - ClassDB::bind_method(D_METHOD("_sbox_input"), &VisualScriptPropertySelector::_sbox_input); - ClassDB::bind_method(D_METHOD("_item_selected"), &VisualScriptPropertySelector::_item_selected); - ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::STRING, "category"), PropertyInfo(Variant::BOOL, "connecting"))); } @@ -705,16 +700,16 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() { //set_child_rect(vbc); search_box = memnew(LineEdit); vbc->add_margin_child(TTR("Search:"), search_box); - search_box->connect_compat("text_changed", this, "_text_changed"); - search_box->connect_compat("gui_input", this, "_sbox_input"); + search_box->connect("text_changed", callable_mp(this, &VisualScriptPropertySelector::_text_changed)); + search_box->connect("gui_input", callable_mp(this, &VisualScriptPropertySelector::_sbox_input)); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect_compat("item_activated", this, "_confirmed"); - search_options->connect_compat("cell_selected", this, "_item_selected"); + search_options->connect("item_activated", callable_mp(this, &VisualScriptPropertySelector::_confirmed)); + search_options->connect("cell_selected", callable_mp(this, &VisualScriptPropertySelector::_item_selected)); search_options->set_hide_root(true); search_options->set_hide_folding(true); virtuals_only = false; |