Skip to content
Snippets Groups Projects
Commit d252767c authored by Finn Bear's avatar Finn Bear
Browse files

Cleanup fade in transition.

parent 6098993c
No related branches found
No related tags found
No related merge requests found
......@@ -212,19 +212,17 @@ impl Slide for Automata {
.title_bar(false)
.resizable(false)
.show(ui.ctx(), |ui| {
// Nested fade in since fade doesn't propagate from [`Window`] to children.
fade_in(ui, first_rule_fade_start + RULES_DELAY, |ui| {
let rules = [
"Cells with fewer than two neighbors die",
"Cells with more than three neighbors die",
"Cells with three neighbors become alive",
];
for (rule, fade_start) in rules.into_iter().zip(rules_fade) {
fade_in(ui, fade_start.unwrap_or(f64::INFINITY), |ui| {
ui.label(format!(" ⏵ {}", rule));
});
}
})
let rules = [
"Cells with fewer than two neighbors die",
"Cells with more than three neighbors die",
"Cells with three neighbors become alive",
];
for (rule, fade_start) in rules.into_iter().zip(rules_fade) {
// Infinity is a kludge to make it invisible by still take up space.
fade_in(ui, fade_start.unwrap_or(f64::INFINITY), |ui| {
ui.label(format!(" ⏵ {}", rule));
});
}
});
});
}
......
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