working text
This commit is contained in:
+4
-11
@@ -1,16 +1,11 @@
|
||||
use minifb::{Window, WindowOptions};
|
||||
use osgui::{
|
||||
elements::Rect,
|
||||
extensions::velocity::{Velocity, VelocityExtension},
|
||||
style::Transform,
|
||||
Screen,
|
||||
};
|
||||
use osgui::{extensions::velocity::VelocityExtension, style::Transform, Screen};
|
||||
|
||||
fn main() {
|
||||
let window = Window::new(
|
||||
"minifb example",
|
||||
500,
|
||||
500,
|
||||
200,
|
||||
200,
|
||||
WindowOptions {
|
||||
resize: false,
|
||||
..Default::default()
|
||||
@@ -21,9 +16,7 @@ fn main() {
|
||||
let mut app = Screen::new(window);
|
||||
app.extension(VelocityExtension);
|
||||
|
||||
app.draw(Rect)
|
||||
.component(Transform::new().dimensions(40, 40))
|
||||
.component(Velocity(500, 0));
|
||||
app.draw("test".to_string()).component(Transform::center());
|
||||
|
||||
app.run().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user