lpkg/src/tui/animations/mod.rs
2025-10-01 15:01:25 +02:00

13 lines
325 B
Rust

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;
}