| 5371 | static double last_progress_time = 0; |
| 5372 | |
| 5373 | void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) { |
| 5374 | if (!singleton) { |
| 5375 | return; |
| 5376 | } else if (singleton->cmdline_mode) { |
| 5377 | print_line_rich(vformat("[ 0%% ] [color=gray][b]%s[/b] | Started %s (%d steps)[/color]", p_task, p_label, p_steps)); |
| 5378 | progress_total_steps[p_task] = p_steps; |
| 5379 | } else if (singleton->progress_dialog) { |
| 5380 | singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel); |
| 5381 | } |
| 5382 | } |
| 5383 | |
| 5384 | bool EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) { |
| 5385 | if (!singleton) { |
no test coverage detected