2020-04-04 19:40:32 +00:00
|
|
|
use bevy::{prelude::*, window::CreateWindow};
|
2020-03-30 21:53:32 +00:00
|
|
|
|
|
|
|
fn main() {
|
2020-04-04 19:40:32 +00:00
|
|
|
App::build().add_default_plugins().setup(setup).run();
|
2020-03-30 21:53:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn setup(_world: &mut World, resources: &mut Resources) {
|
2020-04-04 19:40:32 +00:00
|
|
|
let mut create_window_events = resources.get_mut::<Events<CreateWindow>>().unwrap();
|
2020-03-30 21:53:32 +00:00
|
|
|
create_window_events.send(CreateWindow {
|
|
|
|
descriptor: WindowDescriptor {
|
|
|
|
width: 800,
|
|
|
|
height: 600,
|
|
|
|
vsync: false,
|
|
|
|
title: "another window".to_string(),
|
2020-04-04 19:40:32 +00:00
|
|
|
},
|
2020-03-30 21:53:32 +00:00
|
|
|
});
|
2020-04-04 19:40:32 +00:00
|
|
|
}
|