MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / init

Method init

gui/gdre_progress.cpp:150–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void 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
170void GDREProgressDialog::Task::set_step(const String &p_state, int p_step, bool p_force_redraw) {
171 current_step.state = p_state;

Callers 1

main_thread_updateMethod · 0.45

Calls 2

set_indeterminateMethod · 0.80
set_valueMethod · 0.45

Tested by

no test coverage detected