diff --git a/src/animations.rs b/src/animations.rs index ba687d8..78c1f93 100644 --- a/src/animations.rs +++ b/src/animations.rs @@ -37,7 +37,9 @@ impl IdleTask { } impl Task for IdleTask { - fn name(&self) -> &'static str { "Idle" } + fn start(&mut self) { + self.surface.set_shader(Box::new(IdleShader { frame: self.frame })); + } fn tick(&mut self) { self.updater.run(|| { @@ -114,7 +116,9 @@ impl TestPattern { } impl Task for TestPattern { - fn name(&self) -> &'static str { "Idle" } + fn start(&mut self) { + self.surface.set_shader(Box::new(TestShader { pattern: self.pattern })); + } fn tick(&mut self) { self.updater.run(|| {