#include #include #include #include namespace hex::plugin::builtin { class PopupTasksWaiting : public Popup { public: PopupTasksWaiting() : hex::Popup("hex.builtin.popup.waiting_for_tasks.title", false) { } void drawContent() override { ImGui::TextUnformatted("hex.builtin.popup.waiting_for_tasks.desc"_lang); ImGui::Separator(); ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize("[-]").x) / 2); ImGui::TextSpinner(""); ImGui::NewLine(); ImGui::SetCursorPosX((ImGui::GetWindowWidth() - 150_scaled) / 2); if (ImGui::ButtonEx("hex.builtin.common.cancel"_lang, ImVec2(150, 0)) || ImGui::IsKeyDown(ImGuiKey_Escape)) ImGui::CloseCurrentPopup(); if (TaskManager::getRunningTaskCount() == 0 && TaskManager::getRunningBackgroundTaskCount() == 0) { ImGui::CloseCurrentPopup(); ImHexApi::System::closeImHex(); } } [[nodiscard]] ImGuiWindowFlags getFlags() const override { return ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove; } }; }