summaryrefslogtreecommitdiff
path: root/editor/editor_node.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.h')
-rw-r--r--editor/editor_node.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 658d5dc0ae..e7ef9eefb5 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -745,8 +745,8 @@ public:
static void add_io_error(const String &p_error);
- static void progress_add_task(const String &p_task, const String &p_label, int p_steps);
- static void progress_task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_refresh = true);
+ static void progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel = false);
+ static bool progress_task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_refresh = true);
static void progress_end_task(const String &p_task);
static void progress_add_task_bg(const String &p_task, const String &p_label, int p_steps);
@@ -807,9 +807,9 @@ public:
struct EditorProgress {
String task;
- void step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); }
- EditorProgress(const String &p_task, const String &p_label, int p_amount) {
- EditorNode::progress_add_task(p_task, p_label, p_amount);
+ bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); }
+ EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) {
+ EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel);
task = p_task;
}
~EditorProgress() { EditorNode::progress_end_task(task); }