From 9a919af67786dcf2b4ab8c4d2192368068ddfec7 Mon Sep 17 00:00:00 2001 From: TheJackiMonster <thejackimonster@gmail.com> Date: Mon, 25 Jul 2022 15:19:44 +0200 Subject: [PATCH] Fix for color picker consistency Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> --- projects/fire_works/src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/fire_works/src/main.cpp b/projects/fire_works/src/main.cpp index f1af6c58..357218a1 100644 --- a/projects/fire_works/src/main.cpp +++ b/projects/fire_works/src/main.cpp @@ -969,7 +969,12 @@ int main(int argc, const char **argv) { bool nested = ImGui::Selectable("Nested Firework"); ImGui::EndListBox(); bool resetTime = ImGui::Button("Reset"); - glm::vec3 color = glm::vec3(0.0f); + auto color = glm::vec3(0.0f); + + if (!events.empty()) { + color = events[0].color; + } + bool colorChanged = ImGui::ColorPicker3("Color", (float*) & color); ImGui::End(); -- GitLab