src/video/uikit/SDL_uikitmessagebox.m
branchiOS-improvements
changeset 9501 574db299498f
parent 9499 6fe9b44b2d84
child 9505 6fc615dfc93f
equal deleted inserted replaced
9500:cbf5c5ecf5ac 9501:574db299498f
    28 
    28 
    29 /* Display a UIKit message box */
    29 /* Display a UIKit message box */
    30 
    30 
    31 static SDL_bool s_showingMessageBox = SDL_FALSE;
    31 static SDL_bool s_showingMessageBox = SDL_FALSE;
    32 
    32 
    33 @interface UIKit_UIAlertViewDelegate : NSObject <UIAlertViewDelegate> {
    33 @interface UIKit_UIAlertViewDelegate : NSObject <UIAlertViewDelegate>
    34 @private
       
    35     int *clickedButtonIndex;
       
    36 }
       
    37 
    34 
    38 - (id)initWithButtonIndex:(int *)_buttonIndex;
    35 - (id)initWithButtonIndex:(int *)_buttonIndex;
    39 - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;
    36 - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;
    40 
    37 
    41 @end
    38 @end
    42 
    39 
    43 @implementation UIKit_UIAlertViewDelegate
    40 @implementation UIKit_UIAlertViewDelegate {
       
    41     int *clickedButtonIndex;
       
    42 }
    44 
    43 
    45 - (id)initWithButtonIndex:(int *)buttonIndex
    44 - (id)initWithButtonIndex:(int *)buttonIndex
    46 {
    45 {
    47     self = [self init];
    46     self = [self init];
    48     if (self == nil) {
    47     if (self == nil) {
    49         return nil;
    48         return nil;
    50     }
    49     }
    51     self->clickedButtonIndex = buttonIndex;
    50 
       
    51     clickedButtonIndex = buttonIndex;
    52 
    52 
    53     return self;
    53     return self;
    54 }
    54 }
    55 
    55 
    56 - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
    56 - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex