summaryrefslogtreecommitdiffstats
path: root/editor/plugins/audio_stream_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/audio_stream_editor_plugin.cpp')
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index e4a9c38a99..7a1722c73b 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -39,7 +39,7 @@
void AudioStreamEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- AudioStreamPreviewGenerator::get_singleton()->connect_compat("preview_updated", this, "_preview_changed");
+ AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AudioStreamEditor::_preview_changed));
}
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
@@ -197,14 +197,6 @@ void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
}
void AudioStreamEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_preview_changed"), &AudioStreamEditor::_preview_changed);
- ClassDB::bind_method(D_METHOD("_play"), &AudioStreamEditor::_play);
- ClassDB::bind_method(D_METHOD("_stop"), &AudioStreamEditor::_stop);
- ClassDB::bind_method(D_METHOD("_on_finished"), &AudioStreamEditor::_on_finished);
- ClassDB::bind_method(D_METHOD("_draw_preview"), &AudioStreamEditor::_draw_preview);
- ClassDB::bind_method(D_METHOD("_draw_indicator"), &AudioStreamEditor::_draw_indicator);
- ClassDB::bind_method(D_METHOD("_on_input_indicator"), &AudioStreamEditor::_on_input_indicator);
}
AudioStreamEditor::AudioStreamEditor() {
@@ -214,7 +206,7 @@ AudioStreamEditor::AudioStreamEditor() {
_dragging = false;
_player = memnew(AudioStreamPlayer);
- _player->connect_compat("finished", this, "_on_finished");
+ _player->connect("finished", callable_mp(this, &AudioStreamEditor::_on_finished));
add_child(_player);
VBoxContainer *vbox = memnew(VBoxContainer);
@@ -223,13 +215,13 @@ AudioStreamEditor::AudioStreamEditor() {
_preview = memnew(ColorRect);
_preview->set_v_size_flags(SIZE_EXPAND_FILL);
- _preview->connect_compat("draw", this, "_draw_preview");
+ _preview->connect("draw", callable_mp(this, &AudioStreamEditor::_draw_preview));
vbox->add_child(_preview);
_indicator = memnew(Control);
_indicator->set_anchors_and_margins_preset(PRESET_WIDE);
- _indicator->connect_compat("draw", this, "_draw_indicator");
- _indicator->connect_compat("gui_input", this, "_on_input_indicator");
+ _indicator->connect("draw", callable_mp(this, &AudioStreamEditor::_draw_indicator));
+ _indicator->connect("gui_input", callable_mp(this, &AudioStreamEditor::_on_input_indicator));
_preview->add_child(_indicator);
HBoxContainer *hbox = memnew(HBoxContainer);
@@ -239,12 +231,12 @@ AudioStreamEditor::AudioStreamEditor() {
_play_button = memnew(ToolButton);
hbox->add_child(_play_button);
_play_button->set_focus_mode(Control::FOCUS_NONE);
- _play_button->connect_compat("pressed", this, "_play");
+ _play_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_play));
_stop_button = memnew(ToolButton);
hbox->add_child(_stop_button);
_stop_button->set_focus_mode(Control::FOCUS_NONE);
- _stop_button->connect_compat("pressed", this, "_stop");
+ _stop_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_stop));
_current_label = memnew(Label);
_current_label->set_align(Label::ALIGN_RIGHT);