Newer
Older
/// A slide that sets some expectations about generative art.
state: IntroductionState,
}
#[derive(Default)]
enum IntroductionState {
#[default]
Weaknesses,
Strengths {
fn transition(&mut self, ctx: &Context) -> bool {
match self.state {
IntroductionState::Weaknesses => {
self.state = IntroductionState::Strengths {
transition_time: ctx.input().time,
};
false
}
IntroductionState::Strengths { .. } => true,
}
ui.small(" ✖ Social context");
ui.small(" ✖ Human emotion");
ui.small(" ✖ Political commentary");
if let IntroductionState::Strengths { transition_time } = &self.state {
fade_in(ui, *transition_time, |ui| {
ui.add_space(10.0);
ui.label("Strengths");
ui.small(" ✔ Following rules");
ui.small(" ✔ Performing computation");
ui.small(" ✔ Harnessing chaos and randomness");
ui.small(" ✔ Guided exploration");
});