diff options
Diffstat (limited to 'editor/progress_dialog.cpp')
-rw-r--r-- | editor/progress_dialog.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 366d0cb2fc..ff8343fbeb 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -30,11 +30,10 @@ #include "progress_dialog.h" -#include "core/object/message_queue.h" #include "core/os/os.h" #include "editor/editor_interface.h" #include "editor/editor_node.h" -#include "editor/editor_scale.h" +#include "editor/themes/editor_scale.h" #include "main/main.h" #include "servers/display_server.h" @@ -97,15 +96,8 @@ void BackgroundProgress::_end_task(const String &p_task) { tasks.erase(p_task); } -void BackgroundProgress::_bind_methods() { - ClassDB::bind_method("_add_task", &BackgroundProgress::_add_task); - ClassDB::bind_method("_task_step", &BackgroundProgress::_task_step); - ClassDB::bind_method("_end_task", &BackgroundProgress::_end_task); - ClassDB::bind_method("_update", &BackgroundProgress::_update); -} - void BackgroundProgress::add_task(const String &p_task, const String &p_label, int p_steps) { - MessageQueue::get_singleton()->push_call(this, "_add_task", p_task, p_label, p_steps); + callable_mp(this, &BackgroundProgress::_add_task).call_deferred(p_task, p_label, p_steps); } void BackgroundProgress::task_step(const String &p_task, int p_step) { @@ -117,7 +109,7 @@ void BackgroundProgress::task_step(const String &p_task, int p_step) { } if (no_updates) { - MessageQueue::get_singleton()->push_call(this, "_update"); + callable_mp(this, &BackgroundProgress::_update).call_deferred(); } { @@ -127,7 +119,7 @@ void BackgroundProgress::task_step(const String &p_task, int p_step) { } void BackgroundProgress::end_task(const String &p_task) { - MessageQueue::get_singleton()->push_call(this, "_end_task", p_task); + callable_mp(this, &BackgroundProgress::_end_task).call_deferred(p_task); } //////////////////////////////////////////////// @@ -242,9 +234,6 @@ void ProgressDialog::_cancel_pressed() { canceled = true; } -void ProgressDialog::_bind_methods() { -} - ProgressDialog::ProgressDialog() { main = memnew(VBoxContainer); add_child(main); |