From aae29c7a0eace9ccfeb430c5a4ebd0c9a431e272 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Fri, 11 Aug 2017 12:04:32 -0300 Subject: Added notification const NOTIFICATION_WM_ABOUT --- platform/osx/os_osx.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'platform/osx') diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 6d8a6eca66..d2b8637aaa 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -137,6 +137,11 @@ static bool mouse_down_control = false; //_GodotInputMonitorChange(); } +- (void)showAbout:(id)sender { + if (OS_OSX::singleton->get_main_loop()) + OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_ABOUT); +} + @end @interface GodotWindowDelegate : NSObject { @@ -1897,7 +1902,7 @@ OS_OSX::OS_OSX() { // Setup Apple menu NSMenu *apple_menu = [[NSMenu alloc] initWithTitle:@""]; title = [NSString stringWithFormat:NSLocalizedString(@"About %@", nil), nsappname]; - [apple_menu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; + [apple_menu addItemWithTitle:title action:@selector(showAbout:) keyEquivalent:@""]; [apple_menu addItem:[NSMenuItem separatorItem]]; -- cgit v1.2.3