Genetic generation of cars in a 2D environment
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

41 lines
1.2 KiB

//
//
// iOSGLEssentials
//
// Copied from the Apple GLEssentials
//
//
#import "GLEssentialsFullscreenWindow.h"
@implementation GLEssentialsFullscreenWindow
- (id)init {
// Create a screen-sized window on the display you want to take over
// Initialize the window making it size of the screen and borderless
NSRect screenRect = [[NSScreen mainScreen] frame];
if(self = [super initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES]){
self.level = NSMainMenuWindowLevel + 1; // Set the window level to be above the menu bar to cover everything else
self.opaque = YES; // Set opaque
self.hidesOnDeactivate = YES; // Hide this when user switches to another window (or app)
}
return self;
}
- (BOOL)canBecomeKeyWindow {
// Return yes so that this borderless window can receive input
return YES;
}
- (void)keyDown:(NSEvent *)event {
// Implement keyDown since controller will not get [ESC] key event which
// the controller uses to kill fullscreen
[self.windowController keyDown:event];
}
@end