Add menu command-q shortcut to quit STK in OSX
This commit is contained in:
parent
9dde7aee95
commit
a616664af2
@ -10,7 +10,7 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "CIrrDeviceMacOSX.h"
|
||||
|
||||
@interface AppDelegate : NSObject
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
{
|
||||
BOOL _quit;
|
||||
irr::CIrrDeviceMacOSX *_device;
|
||||
|
@ -497,7 +497,12 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
|
||||
[[NSAutoreleasePool alloc] init];
|
||||
[NSApplication sharedApplication];
|
||||
[NSApp setDelegate:[[[AppDelegate alloc] initWithDevice:this] autorelease]];
|
||||
[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];
|
||||
NSMenu* mainMenu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
|
||||
[NSApp setMainMenu:mainMenu];
|
||||
NSMenuItem* menuItem = [mainMenu addItemWithTitle:@"" action:nil keyEquivalent:@""];
|
||||
NSMenu* menu = [[NSMenu alloc] initWithTitle:@""];
|
||||
[menu addItemWithTitle:@"Quit SuperTuxKart" action:@selector(terminate:) keyEquivalent:@"q"];
|
||||
[menuItem setSubmenu:[menu autorelease]];
|
||||
[NSApp finishLaunching];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user