Skip to content
Snippets Groups Projects
Commit de23330a authored by elom0n's avatar elom0n
Browse files

added buggy colorpicker

parent a2f7c6b7
No related branches found
No related tags found
1 merge request!106Created initial firework project
...@@ -185,6 +185,12 @@ void InitializeNestedFireworkEvents(std::vector<event_t>& events) { ...@@ -185,6 +185,12 @@ void InitializeNestedFireworkEvents(std::vector<event_t>& events) {
10.0f, 1.0f, 0.0f, 0); 10.0f, 1.0f, 0.0f, 0);
} }
void ChangeColor(std::vector<event_t>& events, glm::vec3 color) {
for (int i = 0; i < events.size(); i++) {
events [i].color = color;
}
}
int main(int argc, const char **argv) { int main(int argc, const char **argv) {
vkcv::Features features; vkcv::Features features;
...@@ -963,6 +969,8 @@ int main(int argc, const char **argv) { ...@@ -963,6 +969,8 @@ int main(int argc, const char **argv) {
bool nested = ImGui::Selectable("Nested Firework"); bool nested = ImGui::Selectable("Nested Firework");
ImGui::EndListBox(); ImGui::EndListBox();
bool resetTime = ImGui::Button("Reset"); bool resetTime = ImGui::Button("Reset");
glm::vec3 color = glm::vec3(0.0f);
bool colorChanged = ImGui::ColorPicker3("Color", (float*) & color);
ImGui::End(); ImGui::End();
gui.endGUI(); gui.endGUI();
...@@ -1003,6 +1011,11 @@ int main(int argc, const char **argv) { ...@@ -1003,6 +1011,11 @@ int main(int argc, const char **argv) {
InitializeNestedFireworkEvents(events); InitializeNestedFireworkEvents(events);
resetTime = true; resetTime = true;
} }
if (colorChanged) {
ChangeColor(events, color);
resetTime = true;
}
if (resetTime) { if (resetTime) {
start = std::chrono::system_clock::now(); start = std::chrono::system_clock::now();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment