Преглед на файлове

Updates Max OS X Window Handling to be better

FullScreen
- Window is higher then the 'main menu'
- Alt tab disables application

Window Mode
- Window  is at the 'normal' level and other windows can go over it

Append small fix to author
Author Name преди 13 години
родител
ревизия
ab38731d2b
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      gameplay/src/PlatformMacOSX.mm

+ 6 - 1
gameplay/src/PlatformMacOSX.mm

@@ -153,9 +153,14 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
     _game->run();
     _game->run();
     
     
     if (__fullscreen)
     if (__fullscreen)
+    {
         [[self window] setLevel: NSMainMenuWindowLevel+1];
         [[self window] setLevel: NSMainMenuWindowLevel+1];
+        [[self window] setHidesOnDeactivate:YES]; 
+    }
     else
     else
-        [[self window] setLevel: NSFloatingWindowLevel];
+    {
+        [[self window] setLevel: NSNormalWindowLevel];
+    }
     [[self window] makeKeyAndOrderFront: self];
     [[self window] makeKeyAndOrderFront: self];
     [[self window] setTitle: [NSString stringWithUTF8String: __title ? __title : ""]];
     [[self window] setTitle: [NSString stringWithUTF8String: __title ? __title : ""]];