project_files/HedgewarsMobile/Classes/InGameMenuViewController.m
changeset 6409 ca93f38a1aab
parent 6269 57523ab57218
child 6700 e04da46ee43c
equal deleted inserted replaced
6407:f63b2330147a 6409:ca93f38a1aab
    21 
    21 
    22 #import "InGameMenuViewController.h"
    22 #import "InGameMenuViewController.h"
    23 #import "SDL_sysvideo.h"
    23 #import "SDL_sysvideo.h"
    24 #import "SDL_uikitkeyboard.h"
    24 #import "SDL_uikitkeyboard.h"
    25 
    25 
    26 //FIXME: add a proper #import when this is exposed in SDL
       
    27 extern UIView *SDL_getUikitView(void *);
       
    28 
    26 
    29 #define VIEW_HEIGHT 200
    27 #define VIEW_HEIGHT 200
    30 
    28 
    31 @implementation InGameMenuViewController
    29 @implementation InGameMenuViewController
    32 
    30 
   113             actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
   111             actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
   114                                                       delegate:self
   112                                                       delegate:self
   115                                              cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
   113                                              cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
   116                                         destructiveButtonTitle:NSLocalizedString(@"Of course!", @"")
   114                                         destructiveButtonTitle:NSLocalizedString(@"Of course!", @"")
   117                                              otherButtonTitles:nil];
   115                                              otherButtonTitles:nil];
   118             [actionSheet showInView:(IS_IPAD() ? self.view : SDL_getUikitView(HW_getSDLWindow()))];
   116             [actionSheet showInView:(IS_IPAD() ? self.view : [HWUtils mainSDLViewInstance])];
   119             [actionSheet release];
   117             [actionSheet release];
   120 
   118 
   121             break;
   119             break;
   122         default:
   120         default:
   123             DLog(@"Warning: unset case value in section!");
   121             DLog(@"Warning: unset case value in section!");