Add Window::builder, which replaces WindowBuilder::new
This commit is contained in:
parent
ef2ec904ce
commit
569c44a632
39 changed files with 109 additions and 94 deletions
|
|
@ -3,12 +3,12 @@
|
|||
use simple_logger::SimpleLogger;
|
||||
use winit::dpi::{PhysicalPosition, PhysicalSize};
|
||||
use winit::monitor::MonitorHandle;
|
||||
use winit::{event_loop::EventLoop, window::WindowBuilder};
|
||||
use winit::{event_loop::EventLoop, window::Window};
|
||||
|
||||
fn main() {
|
||||
SimpleLogger::new().init().unwrap();
|
||||
let event_loop = EventLoop::new().unwrap();
|
||||
let window = WindowBuilder::new().build(&event_loop).unwrap();
|
||||
let window = Window::builder().build(&event_loop).unwrap();
|
||||
|
||||
if let Some(mon) = window.primary_monitor() {
|
||||
print_info("Primary output", mon);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue