Skip to content

Commit

Permalink
ui: Added cancel button to task running popup
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jan 28, 2023
1 parent a142d4f commit c4d52da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/builtin/source/content/ui_items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ namespace hex::plugin::builtin {
ImGui::TextUnformatted("hex.builtin.popup.waiting_for_tasks.desc"_lang);
ImGui::Separator();

ImGui::NewLine();
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();
Expand Down

0 comments on commit c4d52da

Please sign in to comment.