summaryrefslogtreecommitdiff
path: root/editor/plugins/sprite_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-21 18:28:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-28 14:24:09 +0100
commit01afc442c73661df677c2b93f4037a21992ee45b (patch)
tree9a5b0b68cb022873ba31929fe6a785ddf5c0555c /editor/plugins/sprite_editor_plugin.cpp
parenta439131c2b06b3d452e5be13530b6d2caa72c1aa (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 'editor/plugins/sprite_editor_plugin.cpp')
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index c35afa0644..135807e88c 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -504,10 +504,6 @@ void SpriteEditor::_debug_uv_draw() {
void SpriteEditor::_bind_methods() {
- ClassDB::bind_method("_menu_option", &SpriteEditor::_menu_option);
- ClassDB::bind_method("_debug_uv_draw", &SpriteEditor::_debug_uv_draw);
- ClassDB::bind_method("_update_mesh_data", &SpriteEditor::_update_mesh_data);
- ClassDB::bind_method("_create_node", &SpriteEditor::_create_node);
ClassDB::bind_method("_add_as_sibling_or_child", &SpriteEditor::_add_as_sibling_or_child);
}
@@ -526,7 +522,7 @@ SpriteEditor::SpriteEditor() {
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
options->set_switch_on_hover(true);
- options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &SpriteEditor::_menu_option));
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
@@ -542,9 +538,9 @@ SpriteEditor::SpriteEditor() {
scroll->set_enable_v_scroll(true);
vb->add_margin_child(TTR("Preview:"), scroll, true);
debug_uv = memnew(Control);
- debug_uv->connect_compat("draw", this, "_debug_uv_draw");
+ debug_uv->connect("draw", callable_mp(this, &SpriteEditor::_debug_uv_draw));
scroll->add_child(debug_uv);
- debug_uv_dialog->connect_compat("confirmed", this, "_create_node");
+ debug_uv_dialog->connect("confirmed", callable_mp(this, &SpriteEditor::_create_node));
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_child(memnew(Label(TTR("Simplification: "))));
@@ -573,7 +569,7 @@ SpriteEditor::SpriteEditor() {
hb->add_spacer();
update_preview = memnew(Button);
update_preview->set_text(TTR("Update Preview"));
- update_preview->connect_compat("pressed", this, "_update_mesh_data");
+ update_preview->connect("pressed", callable_mp(this, &SpriteEditor::_update_mesh_data));
hb->add_child(update_preview);
vb->add_margin_child(TTR("Settings:"), hb);