diff options
Diffstat (limited to 'editor/editor_node.h')
-rw-r--r-- | editor/editor_node.h | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/editor/editor_node.h b/editor/editor_node.h index 0877d458a7..222b1cf90c 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -122,6 +122,14 @@ class SurfaceUpgradeTool; class SurfaceUpgradeDialog; class WindowWrapper; +struct EditorProgress { + String task; + bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true); + + EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false); + ~EditorProgress(); +}; + class EditorNode : public Node { GDCLASS(EditorNode, Node); @@ -470,6 +478,7 @@ private: String external_file; String open_navigate; String saving_scene; + EditorProgress *save_scene_progress = nullptr; DynamicFontImportSettingsDialog *fontdata_import_settings = nullptr; SceneImportSettingsDialog *scene_import_settings = nullptr; @@ -624,6 +633,7 @@ private: void _find_node_types(Node *p_node, int &count_2d, int &count_3d); void _save_scene_with_preview(String p_file, int p_idx = -1); + void _close_save_scene_progress(); bool _find_scene_in_use(Node *p_node, const String &p_path) const; @@ -952,33 +962,6 @@ public: bool ensure_main_scene(bool p_from_native); }; -struct EditorProgress { - String task; - bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { - if (Thread::is_main_thread()) { - return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); - } else { - EditorNode::progress_task_step_bg(task, p_step); - return false; - } - } - EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) { - if (Thread::is_main_thread()) { - EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel); - } else { - EditorNode::progress_add_task_bg(p_task, p_label, p_amount); - } - task = p_task; - } - ~EditorProgress() { - if (Thread::is_main_thread()) { - EditorNode::progress_end_task(task); - } else { - EditorNode::progress_end_task_bg(task); - } - } -}; - class EditorPluginList : public Object { private: Vector<EditorPlugin *> plugins_list; |