Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAPHICS: MACGUI: Make it possible to disable menus #6395

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

eriktorbjorn
Copy link
Member

@eriktorbjorn eriktorbjorn commented Jan 6, 2025

On a real Macintosh, you can disable entire menus. They will show up as grayed out in the menu bar, everything in them will be grayed out, and you cannot open submenus. As seen in this screenshot from an emulator:

image

This is an initial attempt at implementing this in ScummVM. What I have so far:

  • Disabled menus are rendered as grayed out in the menu bar.
  • Keyboard shortcuts are not available for disabled menus.
  • Disabled submenus now still get their (grayed out) submenu arrow glyph.
  • Unlike top-level menus, disabled submenus do not open.

I'm definitely going to need help with testing it, because it's easy to miss things. (I almost missed the keyboard shortcuts.)

Here is a preview of what I intend to use it for. In v6 and v7 games, the Edit menu is disabled. (In earlier games, it's not.) And in Maniac Mansion (which uses the same kind of Mac GUI), the Sound menu is also disabled.

image

I guess this also opens the door - just a crack - to keeping the menus active during dialogs. (In the original, this allows you to use the Edit menu during the Save dialog, though all other menus are grayed out.) But that appears to be quite tricky.

Torbjörn Andersson added 2 commits January 6, 2025 17:34
Disabled menus can still be opened. Menu items in disabled menus will
look and act as if they were individually disabled. Enabling the menu
will restore it to its pre-disabled state.
@eriktorbjorn eriktorbjorn marked this pull request as draft January 6, 2025 17:14
@eriktorbjorn eriktorbjorn marked this pull request as ready for review January 7, 2025 19:18
@bluegr
Copy link
Member

bluegr commented Jan 8, 2025

Nice work, thanks!
Merging

@bluegr bluegr merged commit c64c763 into scummvm:master Jan 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants