semi working
This commit is contained in:
+19
-5
@@ -1,12 +1,26 @@
|
||||
use minifb::{Window, WindowOptions};
|
||||
use osgui::{elements::Rect, App};
|
||||
use osgui::{
|
||||
elements::Rect,
|
||||
extensions::velocity::{Velocity, VelocityExtension},
|
||||
Screen,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let window = Window::new("minifb example", 500, 500, WindowOptions::default()).unwrap();
|
||||
let window = Window::new(
|
||||
"minifb example",
|
||||
500,
|
||||
500,
|
||||
WindowOptions {
|
||||
resize: false,
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let mut app = App::new(window);
|
||||
let mut app = Screen::new(window);
|
||||
app.extension(VelocityExtension);
|
||||
|
||||
app.element(Rect);
|
||||
app.draw(Rect).component(Velocity(100, 0));
|
||||
|
||||
app.run();
|
||||
app.run().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user