| 148 | } |
| 149 | |
| 150 | void GDREProgressDialog::Task::init(VBoxContainer *main) { |
| 151 | ERR_FAIL_COND(vb); |
| 152 | vb = memnew(VBoxContainer); |
| 153 | VBoxContainer *vb2 = memnew(VBoxContainer); |
| 154 | vb->add_margin_child(label, vb2); |
| 155 | progress = memnew(ProgressBar); |
| 156 | if (indeterminate) { |
| 157 | steps = 1; |
| 158 | progress->set_indeterminate(true); |
| 159 | } |
| 160 | progress->set_max(steps); |
| 161 | progress->set_value(steps); |
| 162 | vb2->add_child(progress); |
| 163 | state = memnew(Label); |
| 164 | state->set_clip_text(true); |
| 165 | vb2->add_child(state); |
| 166 | main->add_child(vb); |
| 167 | initialized = true; |
| 168 | } |
| 169 | |
| 170 | void GDREProgressDialog::Task::set_step(const String &p_state, int p_step, bool p_force_redraw) { |
| 171 | current_step.state = p_state; |
no test coverage detected