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