mirror of
https://github.com/thes3m/XNI
synced 2024-12-26 13:26:06 +01:00
Adding Game Center classes skeletons. git-svn-id: http://xni.googlecode.com/svn/XNI@62 ac433895-eea3-a490-d80a-17149a75e588
53 lines
1009 B
Objective-C
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
|