Skip to content

Commit

Permalink
Fade in on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcooke committed Sep 19, 2009
1 parent c9269fc commit b68a4bb
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
44 changes: 22 additions & 22 deletions English.lproj/MainMenu.nib/designable.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
3 changes: 0 additions & 3 deletions RyderController.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
-(IBAction)newName:(id)sender;
-(IBAction)enableSpeech:(NSButton*)sender;

-(void)applicationWillFinishLaunching:(NSNotification*)notification;
-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication;

// In Interface Builder, make a 'delegate' connection
// from File's Owner to Ryder Controller.

Expand Down
14 changes: 13 additions & 1 deletion RyderController.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// (c) 2008-2009 Liam Cooke
// MIT Licensed -- see LICENSE.txt

#import <QuartzCore/QuartzCore.h>
#import "RyderController.h"
#import "RyderNamer.h"

Expand All @@ -14,7 +15,8 @@ @implementation RyderController

-(id)init
{
if (self = [super init]) {
self = [super init];
if (self) {
ryder = [[RyderNamer alloc] init];

speechEnabled = NO; //[[NSUserDefaults standardUserDefaults] boolForKey:speakNames];
Expand Down Expand Up @@ -67,18 +69,28 @@ -(IBAction)enableSpeech:(NSButton*)sender

-(void)awakeFromNib
{
[window setDelegate:self];
[window center];
}

-(void)applicationWillFinishLaunching:(NSNotification*)notification
{
PFMoveToApplicationsFolderIfNecessary();

[window setAlphaValue:0.0];
[window makeKeyAndOrderFront:self];
[window.animator setAlphaValue:1.0];
}

-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication
{
return YES;
}

-(BOOL)windowShouldClose:(id)theWindow
{
//[window.animator setAlphaValue:0.0];
return YES;
}

@end

0 comments on commit b68a4bb

Please sign in to comment.