mirror of
https://github.com/italicsjenga/muda.git
synced 2025-01-26 02:56:34 +11:00
fix(example): replace deprecated EventLoopExtMacOS
with EventLoopBuilderExtMacOS
(#15)
This commit is contained in:
parent
5c1b220cbb
commit
28ffd206fa
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
use muda::{menu_event_receiver, Menu, NativeMenuItem};
|
use muda::{menu_event_receiver, Menu, NativeMenuItem};
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
use winit::platform::macOS::EventLoopExtMacOS;
|
use winit::platform::macos::EventLoopBuilderExtMacOS;
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
use winit::platform::windows::{EventLoopBuilderExtWindows, WindowExtWindows};
|
use winit::platform::windows::{EventLoopBuilderExtWindows, WindowExtWindows};
|
||||||
use winit::{
|
use winit::{
|
||||||
|
@ -26,11 +26,11 @@ fn main() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
event_loop_builder.with_default_menu(false);
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut event_loop = event_loop_builder.build();
|
let mut event_loop = event_loop_builder.build();
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
event_loop.enable_default_menu_creation(false);
|
|
||||||
|
|
||||||
let window = WindowBuilder::new().build(&event_loop).unwrap();
|
let window = WindowBuilder::new().build(&event_loop).unwrap();
|
||||||
let _window2 = WindowBuilder::new().build(&event_loop).unwrap();
|
let _window2 = WindowBuilder::new().build(&event_loop).unwrap();
|
||||||
|
|
Loading…
Add table
Reference in a new issue