custom function colors

This commit is contained in:
Simon Gardling
2022-04-04 13:59:18 -04:00
parent 5d71c82c0d
commit 6041da764b
3 changed files with 28 additions and 4 deletions

View File

@@ -593,7 +593,7 @@ impl epi::App for MathApp {
// Button to add a new function
if ui
.add(Button::new("Add Function"))
.add_enabled(14 > self.func_strs.len(), Button::new("Add Function"))
.on_hover_text("Create and graph new function")
.clicked()
{
@@ -755,7 +755,7 @@ impl epi::App for MathApp {
.functions
.iter()
.enumerate()
.map(|(_, function)| function.display(plot_ui, &self.settings))
.map(|(i, function)| function.display(plot_ui, &self.settings, COLORS[i]))
.collect();
});
});