diff --git a/PanoPainter-OSX/main.cpp b/PanoPainter-OSX/main.cpp index 40daf05..ba21059 100644 --- a/PanoPainter-OSX/main.cpp +++ b/PanoPainter-OSX/main.cpp @@ -288,25 +288,13 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime @interface Window : NSWindow @end @implementation Window -- (void)keyDown:(NSEvent *)theEvent -{ - [[self windowController] keyDown:theEvent]; -} @end @interface Controller : NSWindowController @end @implementation Controller -- (void)keyDown:(NSEvent *)theEvent +- (void)windowWillClose:(NSNotification *)notification { - unichar c = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; - if (c == 27) - { - [[NSApplication sharedApplication] terminate:nil]; - } -} -- (void)windowDidResize:(NSNotification *)notification -{ - + [[NSApplication sharedApplication] terminate:nil]; } @end @@ -336,9 +324,11 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime NSRect r = NSMakeRect(0, 0, App::I.width, App::I.height); view = [[View alloc] initWithFrame:r]; - - auto style = NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask; + controller = [[Controller alloc] initWithWindow:window]; + + auto style = NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask|NSClosableWindowMask; window = [[Window alloc] initWithContentRect:r styleMask:style backing:NSBackingStoreBuffered defer:NO]; + [window setDelegate:controller]; [window setTitle:@"PanoPainter 0.1.2 alpha"]; [window center]; [window makeKeyAndOrderFront:controller]; @@ -346,8 +336,6 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime [window setAcceptsMouseMovedEvents:true]; [window makeFirstResponder:view]; - controller = [[Controller alloc] initWithWindow:window]; - auto menubar = [NSMenu new]; auto appMenuItem = [NSMenuItem new]; [menubar addItem:appMenuItem]; diff --git a/PanoPainter/GameViewController.m b/PanoPainter/GameViewController.m index 42fe1cf..52731d4 100644 --- a/PanoPainter/GameViewController.m +++ b/PanoPainter/GameViewController.m @@ -204,6 +204,7 @@ glm::vec2 t_pos; App::I.initLog(); App::I.ios_view = self; + self.preferredFramesPerSecond = 60; self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; if (!self.context) { diff --git a/PanoPainter/Info.plist b/PanoPainter/Info.plist index 90b2ea6..fd0f446 100644 --- a/PanoPainter/Info.plist +++ b/PanoPainter/Info.plist @@ -2,8 +2,6 @@ - NSPhotoLibraryAddUsageDescription - Save the pano image in the user gallery CFBundleDevelopmentRegion en CFBundleExecutable @@ -24,6 +22,8 @@ 1 LSRequiresIPhoneOS + NSPhotoLibraryAddUsageDescription + Save the pano image in the user gallery UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/data/Icons/Edge.png b/data/Icons/Edge.png new file mode 100644 index 0000000..cbdc41e Binary files /dev/null and b/data/Icons/Edge.png differ diff --git a/data/layout.xml b/data/layout.xml index 5fed29c..db2f76d 100644 --- a/data/layout.xml +++ b/data/layout.xml @@ -119,8 +119,18 @@ - - + + + + + + + + + + + + @@ -394,6 +404,10 @@ + + + + @@ -450,12 +464,17 @@ + + + +