diff options
| author | Juan Linietsky | 2017-12-14 08:59:46 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-12-14 09:01:27 -0300 |
| commit | f3ad14224e27f2a25196575e3c43ebc792c90894 (patch) | |
| tree | 84e60bc2fafda809f51bd0892e39205da9423068 /editor/editor_node.h | |
| parent | aa6772d7abb3ff1ff77b1b658617904bb0af1fbb (diff) | |
| download | godot-f3ad14224e27f2a25196575e3c43ebc792c90894.tar.gz godot-f3ad14224e27f2a25196575e3c43ebc792c90894.tar.zst godot-f3ad14224e27f2a25196575e3c43ebc792c90894.zip | |
Diffstat (limited to 'editor/editor_node.h')
| -rw-r--r-- | editor/editor_node.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_node.h b/editor/editor_node.h index 658d5dc0a..e7ef9eefb 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); } |
