use pyqie::{Pyqie, PyqieCallback}; pub struct App { x: f64, y: f64, } impl App { fn init() { let mut pyqie = pyqie::init( Some(1000) ); let app = App { x: 0.0, y: 0.0 }; pyqie.run(app); } } impl PyqieCallback for App { fn update(&mut self, pyqie: &mut Pyqie) { if pyqie.frame_count < 60 { self.x += (pyqie.frame_count % 2) as f64; self.y -= 1.0; }else{ pyqie.quit(); } println!("run update frame_count = {}",pyqie.frame_count); } fn draw(&mut self, pyqie: &mut Pyqie) {} } pub fn main() { App::init(); }