emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
980 stars 92 forks source link

Fix disabling menu items on macOS #336

Closed thisjaiden closed 6 months ago

thisjaiden commented 6 months ago

If a NSMenu does not have setAutoenablesItems:NO then any NSMenuItems cannot be disabled. This fixes the functionality of disabling menu items on macOS.

Realistically down the line a test case should be added to the menu example for disabled menus, but it's not a huge concern and I'm not putting it in this PR.

I've tested this PR with the menu example which has no change (good!) and a personal project which is working as expected. This does not impact menu items that are enabled by default through minifb.

emoon commented 6 months ago

Thanks!