Skip to content
Snippets Groups Projects
Unverified Commit 8c18d4f3 authored by TheJackiMonster's avatar TheJackiMonster
Browse files

Make button safer to use

parent 24a58201
No related branches found
No related tags found
1 merge request!106Created initial firework project
......@@ -832,7 +832,14 @@ int main(int argc, const char **argv) {
gui.beginGUI();
ImGui::Begin("Settings");
if (ImGui::Button("Reset")) {
bool resetTime = ImGui::Button("Reset");
ImGui::End();
gui.endGUI();
core.endFrame(windowHandle);
if (resetTime) {
start = std::chrono::system_clock::now();
particleBuffer.fill(particles);
......@@ -843,11 +850,6 @@ int main(int argc, const char **argv) {
memset(smokeIndices, 0, smokeIndexBuffer.getSize());
}
ImGui::End();
gui.endGUI();
core.endFrame(windowHandle);
}
smokeIndexBuffer.unmap();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment