From 7fb10d90d7e5fe90db677028ac73422d1b616cd5 Mon Sep 17 00:00:00 2001 From: Vanessa Karolek <vaka1997@uni-koblenz.de> Date: Mon, 31 Jan 2022 18:48:19 +0100 Subject: [PATCH] add reset buttons for alpha, beta --- projects/wobble_bobble/src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/wobble_bobble/src/main.cpp b/projects/wobble_bobble/src/main.cpp index bab39304..6c4fb680 100644 --- a/projects/wobble_bobble/src/main.cpp +++ b/projects/wobble_bobble/src/main.cpp @@ -750,7 +750,15 @@ int main(int argc, const char **argv) { ImGui::Checkbox("Render Grid", &renderGrid); ImGui::SliderFloat("Alpha (PIC -> FLIP)", &alpha, 0.0f, 1.0f); + ImGui::SameLine(0.0f, 10.0f); + if (ImGui::SmallButton("Reset")) { + alpha = 0.5f; + } ImGui::SliderFloat("Beta (Alpha -> APIC)", &beta, 0.0f, 1.0f); + ImGui::SameLine(0.0f, 10.0f); + if (ImGui::SmallButton("Reset")) { + beta = 0.75f; + } ImGui::DragFloat3("Initial velocity", reinterpret_cast<float*>(&initialVelocity)); -- GitLab