Adding a "Full Screen" menu item on Mac OS X?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Locked
User avatar
eisnerguy1
Got a warning
Posts: 42
Joined: Mon Feb 27, 2012 10:06 am

Adding a "Full Screen" menu item on Mac OS X?

Post by eisnerguy1 »

So, I was wondering if there was a way to add a "Full Screen" menu item on Mac OS X? I know that the file I would need to edit is:
/backends/platform/sdl/macosx/appmenu_osx.mm

but, every thing I've tried only produces a greyed-out menu item. Here's a few examples of the code I've tried:

Code: Select all

    // Add "Full Screen" menu item
    nsString = constructNSStringFromCString(_("Full Screen"), stringEncoding);
    menuItem = [[NSMenuItem alloc] initWithTitle:nsString action:@selector(fullscreen:) keyEquivalent:@"\r"];
    [setKeyEquivalentModifierMask:NSAlternateKeyMask | NSCommandKeyMask];
    [windowMenu addItem:menuItem];
    [nsString release];



    // Add "Full Screen" menu item
	nsString = constructNSStringFromCString(_("Full Screen"), stringEncoding);
	menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:nsString action:@selector(fullscreen:) keyEquivalent:@“\r”];
	[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask)];
Any help/suggestions would be greatly appreciated.
User avatar
criezy
ScummVM Developer
Posts: 950
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

Please do not cross post (forum rule #7).
Locking this thread. The discussion can continue in http://forums.scummvm.org/viewtopic.php ... d0564734b8
Locked