(&mut self, text: String, speed: f32)
| 100 | } |
| 101 | |
| 102 | pub(crate) fn start_animation(&mut self, text: String, speed: f32) { |
| 103 | self.full_text = text; |
| 104 | self.speed = Duration::from_millis(speed as u64); |
| 105 | self.current_index = 0; |
| 106 | self.is_running = true; |
| 107 | } |
| 108 | |
| 109 | pub(crate) fn end(&mut self) { |
| 110 | self.current_index = self.full_text.chars().count() - 1; |