mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Reworked signal connection system, added support for Callable and Signal objects and made them default.
This commit is contained in:
parent
1a4be2cd8f
commit
69c95f4b4c
275 changed files with 3831 additions and 2948 deletions
|
|
@ -39,7 +39,7 @@
|
|||
void AudioStreamEditor::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed");
|
||||
AudioStreamPreviewGenerator::get_singleton()->connect_compat("preview_updated", this, "_preview_changed");
|
||||
}
|
||||
|
||||
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
|
||||
|
|
@ -214,7 +214,7 @@ AudioStreamEditor::AudioStreamEditor() {
|
|||
_dragging = false;
|
||||
|
||||
_player = memnew(AudioStreamPlayer);
|
||||
_player->connect("finished", this, "_on_finished");
|
||||
_player->connect_compat("finished", this, "_on_finished");
|
||||
add_child(_player);
|
||||
|
||||
VBoxContainer *vbox = memnew(VBoxContainer);
|
||||
|
|
@ -223,13 +223,13 @@ AudioStreamEditor::AudioStreamEditor() {
|
|||
|
||||
_preview = memnew(ColorRect);
|
||||
_preview->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
_preview->connect("draw", this, "_draw_preview");
|
||||
_preview->connect_compat("draw", this, "_draw_preview");
|
||||
vbox->add_child(_preview);
|
||||
|
||||
_indicator = memnew(Control);
|
||||
_indicator->set_anchors_and_margins_preset(PRESET_WIDE);
|
||||
_indicator->connect("draw", this, "_draw_indicator");
|
||||
_indicator->connect("gui_input", this, "_on_input_indicator");
|
||||
_indicator->connect_compat("draw", this, "_draw_indicator");
|
||||
_indicator->connect_compat("gui_input", this, "_on_input_indicator");
|
||||
_preview->add_child(_indicator);
|
||||
|
||||
HBoxContainer *hbox = memnew(HBoxContainer);
|
||||
|
|
@ -239,12 +239,12 @@ AudioStreamEditor::AudioStreamEditor() {
|
|||
_play_button = memnew(ToolButton);
|
||||
hbox->add_child(_play_button);
|
||||
_play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_play_button->connect("pressed", this, "_play");
|
||||
_play_button->connect_compat("pressed", this, "_play");
|
||||
|
||||
_stop_button = memnew(ToolButton);
|
||||
hbox->add_child(_stop_button);
|
||||
_stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_stop_button->connect("pressed", this, "_stop");
|
||||
_stop_button->connect_compat("pressed", this, "_stop");
|
||||
|
||||
_current_label = memnew(Label);
|
||||
_current_label->set_align(Label::ALIGN_RIGHT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue