You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
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.)
This commit is contained in:
@@ -568,25 +568,10 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_bind_methods() {
|
||||
ClassDB::bind_method("_blend_space_gui_input", &AnimationNodeBlendSpace1DEditor::_blend_space_gui_input);
|
||||
ClassDB::bind_method("_blend_space_draw", &AnimationNodeBlendSpace1DEditor::_blend_space_draw);
|
||||
ClassDB::bind_method("_config_changed", &AnimationNodeBlendSpace1DEditor::_config_changed);
|
||||
ClassDB::bind_method("_labels_changed", &AnimationNodeBlendSpace1DEditor::_labels_changed);
|
||||
ClassDB::bind_method("_update_space", &AnimationNodeBlendSpace1DEditor::_update_space);
|
||||
ClassDB::bind_method("_snap_toggled", &AnimationNodeBlendSpace1DEditor::_snap_toggled);
|
||||
ClassDB::bind_method("_tool_switch", &AnimationNodeBlendSpace1DEditor::_tool_switch);
|
||||
ClassDB::bind_method("_erase_selected", &AnimationNodeBlendSpace1DEditor::_erase_selected);
|
||||
ClassDB::bind_method("_update_tool_erase", &AnimationNodeBlendSpace1DEditor::_update_tool_erase);
|
||||
ClassDB::bind_method("_edit_point_pos", &AnimationNodeBlendSpace1DEditor::_edit_point_pos);
|
||||
|
||||
ClassDB::bind_method("_add_menu_type", &AnimationNodeBlendSpace1DEditor::_add_menu_type);
|
||||
ClassDB::bind_method("_add_animation_type", &AnimationNodeBlendSpace1DEditor::_add_animation_type);
|
||||
|
||||
ClassDB::bind_method("_update_edited_point_pos", &AnimationNodeBlendSpace1DEditor::_update_edited_point_pos);
|
||||
|
||||
ClassDB::bind_method("_open_editor", &AnimationNodeBlendSpace1DEditor::_open_editor);
|
||||
|
||||
ClassDB::bind_method("_file_opened", &AnimationNodeBlendSpace1DEditor::_file_opened);
|
||||
}
|
||||
|
||||
bool AnimationNodeBlendSpace1DEditor::can_edit(const Ref<AnimationNode> &p_node) {
|
||||
@@ -622,28 +607,28 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
top_hb->add_child(tool_blend);
|
||||
tool_blend->set_pressed(true);
|
||||
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
|
||||
tool_blend->connect_compat("pressed", this, "_tool_switch", varray(3));
|
||||
tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(3));
|
||||
|
||||
tool_select = memnew(ToolButton);
|
||||
tool_select->set_toggle_mode(true);
|
||||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
|
||||
tool_select->connect_compat("pressed", this, "_tool_switch", varray(0));
|
||||
tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(0));
|
||||
|
||||
tool_create = memnew(ToolButton);
|
||||
tool_create->set_toggle_mode(true);
|
||||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
tool_create->set_tooltip(TTR("Create points."));
|
||||
tool_create->connect_compat("pressed", this, "_tool_switch", varray(1));
|
||||
tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(1));
|
||||
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
top_hb->add_child(tool_erase_sep);
|
||||
tool_erase = memnew(ToolButton);
|
||||
top_hb->add_child(tool_erase);
|
||||
tool_erase->set_tooltip(TTR("Erase points."));
|
||||
tool_erase->connect_compat("pressed", this, "_erase_selected");
|
||||
tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected));
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
@@ -652,7 +637,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
snap->set_tooltip(TTR("Enable snap and show grid."));
|
||||
snap->connect_compat("pressed", this, "_snap_toggled");
|
||||
snap->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_snap_toggled));
|
||||
|
||||
snap_value = memnew(SpinBox);
|
||||
top_hb->add_child(snap_value);
|
||||
@@ -670,12 +655,12 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
edit_value->set_min(-1000);
|
||||
edit_value->set_max(1000);
|
||||
edit_value->set_step(0.01);
|
||||
edit_value->connect_compat("value_changed", this, "_edit_point_pos");
|
||||
edit_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_edit_point_pos));
|
||||
|
||||
open_editor = memnew(Button);
|
||||
edit_hb->add_child(open_editor);
|
||||
open_editor->set_text(TTR("Open Editor"));
|
||||
open_editor->connect_compat("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
|
||||
open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_open_editor), varray(), CONNECT_DEFERRED);
|
||||
|
||||
edit_hb->hide();
|
||||
open_editor->hide();
|
||||
@@ -691,8 +676,8 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
panel->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
blend_space_draw = memnew(Control);
|
||||
blend_space_draw->connect_compat("gui_input", this, "_blend_space_gui_input");
|
||||
blend_space_draw->connect_compat("draw", this, "_blend_space_draw");
|
||||
blend_space_draw->connect("gui_input", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_gui_input));
|
||||
blend_space_draw->connect("draw", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_draw));
|
||||
blend_space_draw->set_focus_mode(FOCUS_ALL);
|
||||
|
||||
panel->add_child(blend_space_draw);
|
||||
@@ -724,10 +709,10 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
bottom_hb->add_child(max_value);
|
||||
}
|
||||
|
||||
snap_value->connect_compat("value_changed", this, "_config_changed");
|
||||
min_value->connect_compat("value_changed", this, "_config_changed");
|
||||
max_value->connect_compat("value_changed", this, "_config_changed");
|
||||
label_value->connect_compat("text_changed", this, "_labels_changed");
|
||||
snap_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
|
||||
min_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
|
||||
max_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
|
||||
label_value->connect("text_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_labels_changed));
|
||||
|
||||
error_panel = memnew(PanelContainer);
|
||||
add_child(error_panel);
|
||||
@@ -740,18 +725,18 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
|
||||
menu = memnew(PopupMenu);
|
||||
add_child(menu);
|
||||
menu->connect_compat("id_pressed", this, "_add_menu_type");
|
||||
menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
|
||||
|
||||
animations_menu = memnew(PopupMenu);
|
||||
menu->add_child(animations_menu);
|
||||
animations_menu->set_name("animations");
|
||||
animations_menu->connect_compat("index_pressed", this, "_add_animation_type");
|
||||
animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_animation_type));
|
||||
|
||||
open_file = memnew(EditorFileDialog);
|
||||
add_child(open_file);
|
||||
open_file->set_title(TTR("Open Animation Node"));
|
||||
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
|
||||
open_file->connect_compat("file_selected", this, "_file_opened");
|
||||
open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_file_opened));
|
||||
undo_redo = EditorNode::get_undo_redo();
|
||||
|
||||
selected_point = -1;
|
||||
|
||||
Reference in New Issue
Block a user