lpkg/src/tui/animations/mod.rs

14 lines
325 B
Rust
Raw Normal View History

2025-10-01 12:53:20 +02:00
use rsille::canvas::Canvas;
use std::time::Duration;
pub trait Animation {
fn update(&mut self, delta: Duration);
fn render(&self, canvas: &mut Canvas);
fn is_finished(&self) -> bool;
}
pub trait ProgressAnimation: Animation {
fn set_progress(&mut self, progress: f64);
fn get_progress(&self) -> f64;
}