mirror of
https://github.com/italicsjenga/muda.git
synced 2024-12-23 20:11:29 +11:00
Fix winit example
This commit is contained in:
parent
413358ed85
commit
1e33121a8f
|
@ -1,6 +1,6 @@
|
|||
# muda
|
||||
|
||||
Menu utilities for Desktop Applications.
|
||||
Menu Utilities for Desktop Applications.
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
@ -31,11 +31,6 @@ fn main() {
|
|||
menu_bar.init_for_hwnd(_window2.hwnd() as _);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
menu_bar.init_for_nsapp();
|
||||
}
|
||||
|
||||
let menu_channel = menu_event_receiver();
|
||||
let mut open_item_disabled = false;
|
||||
let mut counter = 0;
|
||||
|
@ -61,6 +56,10 @@ fn main() {
|
|||
}
|
||||
|
||||
match event {
|
||||
#[cfg(target_os = "macos")]
|
||||
Event::NewEvents(winit::event::StartCause::Init) => {
|
||||
menu_bar.init_for_nsapp();
|
||||
},
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::CloseRequested,
|
||||
..
|
||||
|
|
Loading…
Reference in a new issue