From d00414da58ff8717fbf899ab2321917d103ca2c6 Mon Sep 17 00:00:00 2001 From: ownedbywuigi Date: Mon, 7 Jul 2025 14:55:40 +0100 Subject: [PATCH] Update to add a popup cautioning users of the pre-alpha state of Pound --- core/main.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/core/main.cpp b/core/main.cpp index 4ee7eda..a27e49a 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -84,7 +84,6 @@ void cpuTest() { } int main() { - Base::Log::Initialize(); Base::Log::Start(); @@ -94,6 +93,7 @@ int main() { initSDL3(); bool rendering = true; + bool show_popup = false; // Flag to control popup visibility while (rendering) { // Process events. @@ -118,10 +118,29 @@ int main() { if (ImGui::Button("Run CPU Test")) { cpuTest(); + show_popup = true; // Trigger the popup after running the test } ImGui::End(); + // Popup logic + if (show_popup) { + ImGui::OpenPopup("CPU Test Info"); + } + + // Define the modal popup + if (ImGui::BeginPopupModal("CPU Test Info", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::Text("The CPU test has ran in the terminal.\nKeep in mind that Pound is still in pre-alpha state."); + ImGui::Separator(); + + if (ImGui::Button("OK", ImVec2(120, 0))) { + show_popup = false; // Close the popup + ImGui::CloseCurrentPopup(); + } + + ImGui::EndPopup(); + } + ImGui::Render(); ImGuiIO& io = ImGui::GetIO(); ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 5.0f);