mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 10:37:00 +00:00
Update to add a popup cautioning users of the pre-alpha state of Pound
This commit is contained in:
parent
ae9ac41219
commit
d00414da58
1 changed files with 20 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue