MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / progress_add_task

Method progress_add_task

editor/editor_node.cpp:5373–5382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5371static double last_progress_time = 0;
5372
5373void 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
5384bool EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) {
5385 if (!singleton) {

Callers 1

_detect_from_projectMethod · 0.80

Calls 3

print_line_richFunction · 0.85
vformatFunction · 0.85
add_taskMethod · 0.45

Tested by

no test coverage detected