| 35 | } |
| 36 | |
| 37 | void WaitDlg::run() { |
| 38 | ImGui::Dummy(ImVec2(0.0f, this->extraVerticalSpacing)); |
| 39 | ImGui::SetCursorPosX(this->width/2-ImGui::GetSpinnerWidth()/2); |
| 40 | ImGui::Spinner("1"); |
| 41 | ImGui::Dummy(ImVec2(0.0f, this->extraVerticalSpacing)); |
| 42 | ImGui::SetCursorPosX(this->width/2-ImGui::CalcTextSize(this->label.c_str()).x/2); |
| 43 | SAFE_IMGUI_TEXT(this->label.c_str()); |
| 44 | if (this->subLabels.size() > 0) { |
| 45 | ImGui::Dummy(ImVec2(0.0f, this->extraVerticalSpacing)); |
| 46 | ImGui::Separator(); |
| 47 | for (auto& line : subLabels) { |
| 48 | ImGui::SetCursorPosX((float)GlobalSettings::scaleIntUI(5)); |
| 49 | SAFE_IMGUI_TEXT(line.c_str()); |
| 50 | } |
| 51 | } |
| 52 | if (checkIfShouldContinue && !checkIfShouldContinue()) { |
| 53 | this->done(); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | void WaitDlg::addSubLabel(BString subLabel, int max) { |
| 58 | while ((int)subLabels.size() > max) { |