From ef5d0defe91d406679d1c19fd22cdd5233a2ce33 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 24 Nov 2011 19:38:11 +0000 Subject: More changes to the Memory Card manager for Mac OS X. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72612 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxrMemCardController.m | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'macosx/PcsxrMemCardController.m') diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index 454da1d3..103d8b95 100644 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -15,8 +15,6 @@ static inline NSImage *imageFromMcd(short * icon) { NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:16 pixelsHigh:16 bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0]; - //[imageRep setSize:NSMakeSize(32, 32)]; - //[imageRep setBitsPerSample:32]; #if 0 int x, y, c; @@ -45,6 +43,8 @@ static inline NSImage *imageFromMcd(short * icon) #endif NSImage *theImage = [[NSImage alloc] init]; [theImage addRepresentation:imageRep]; + [theImage setScalesWhenResized:YES]; + [theImage setSize:NSMakeSize(32, 32)]; [imageRep release]; return [theImage autorelease]; } @@ -162,24 +162,30 @@ static inline NSImage *imageFromMcd(short * icon) - (IBAction)formatCard:(id)sender { - NSInteger memCardSelect = [sender tag]; - if (memCardSelect == 1) { - CreateMcd(Config.Mcd1); - [self loadMemoryCardInfoForCard:1]; - } else { - CreateMcd(Config.Mcd2); - [self loadMemoryCardInfoForCard:2]; + NSInteger formatOkay = NSRunAlertPanel(NSLocalizedString(@"Format Card", nil), NSLocalizedString(@"Formatting a memory card will remove all data on it.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Format", nil), nil); + if (formatOkay == NSAlertAlternateReturn) { + NSInteger memCardSelect = [sender tag]; + if (memCardSelect == 1) { + CreateMcd(Config.Mcd1); + [self loadMemoryCardInfoForCard:1]; + } else { + CreateMcd(Config.Mcd2); + [self loadMemoryCardInfoForCard:2]; + } } } - (IBAction)deleteMemoryObject:(id)sender { - NSInteger memCardSelect = [sender tag]; - if (memCardSelect == 1) { + NSInteger deleteOkay = NSRunAlertPanel(NSLocalizedString(@"Delete Block", nil), NSLocalizedString(@"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Delete", nil), nil); + if (deleteOkay == NSAlertAlternateReturn) { + NSInteger memCardSelect = [sender tag]; + if (memCardSelect == 1) { - [self loadMemoryCardInfoForCard:1]; - } else { + [self loadMemoryCardInfoForCard:1]; + } else { - [self loadMemoryCardInfoForCard:2]; + [self loadMemoryCardInfoForCard:2]; + } } } @end -- cgit v1.2.3