Renderer functional
This commit is contained in:
+11
-3
@@ -1,11 +1,19 @@
|
||||
use osmium::entity::Component;
|
||||
use osmium::terminal;
|
||||
|
||||
fn main() {
|
||||
terminal::hide_cursor().unwrap();
|
||||
|
||||
let mut engine = osmium::init();
|
||||
|
||||
engine.thread("Main.tick", || {});
|
||||
|
||||
let mut my_rect = engine.entity(|r| {
|
||||
// r.draw_rect(0, 0, 10, 10);
|
||||
let my_rect = engine.entity(|r| {
|
||||
r.draw_rect(8, 3, 11, 5, 0x0000ff);
|
||||
});
|
||||
|
||||
terminal::clear().unwrap();
|
||||
|
||||
my_rect.render(&mut osmium::renderer::Renderer {});
|
||||
|
||||
terminal::show_cursor().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user