1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
XNI/Classes/Retronator/Xni/Framework/GamerServices/XniShowMessageBoxResult.m
Matej Jan 49293a9610 View scaling fixes to support iOS before 4.0.
Adding Game Center classes skeletons.

git-svn-id: http://xni.googlecode.com/svn/XNI@62 ac433895-eea3-a490-d80a-17149a75e588
2011-03-29 15:00:49 +00:00

53 lines
1009 B
Objective-C

//
// XniShowMessageBoxResult.m
// XNI
//
// Created by Matej Jan on 23.2.11.
// Copyright 2011 Retronator. All rights reserved.
//
#import "XniShowMessageBoxResult.h"
@implementation XniShowMessageBoxResult
- (id) initWithAsyncState:(id)theAsyncState callback:(Delegate*)theCallback
{
self = [super init];
if (self != nil) {
asyncState = [theAsyncState retain];
callback = [theCallback retain];
// Lock the lock until the alert returns.
asyncLock = [[NSLock alloc] init];
[asyncLock lock];
}
return self;
}
@synthesize asyncState, asyncLock, isCompleted, result;
- (BOOL) completedSynchronously {
return NO;
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
[asyncLock unlock];
isCompleted = YES;
result = [[NSNumber alloc] initWithInteger:buttonIndex];
[callback invokeWithArgument:self];
}
- (void) dealloc
{
[asyncState release];
[callback release];
[asyncLock release];
[result release];
[super dealloc];
}
@end