project_files/HedgewarsMobile/Classes/InGameMenuViewController.m
changeset 6260 025d50a6aeb0
parent 6078 8c0cc07731e5
child 6268 d773867f93db
equal deleted inserted replaced
6259:02765411a912 6260:025d50a6aeb0
    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 *);
    26 
    28 
    27 #define VIEW_HEIGHT 200
    29 #define VIEW_HEIGHT 200
    28 
    30 
    29 @implementation InGameMenuViewController
    31 @implementation InGameMenuViewController
    30 @synthesize menuList;
    32 @synthesize menuList;
   168             actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
   170             actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
   169                                                       delegate:self
   171                                                       delegate:self
   170                                              cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
   172                                              cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
   171                                         destructiveButtonTitle:NSLocalizedString(@"Of course!", @"")
   173                                         destructiveButtonTitle:NSLocalizedString(@"Of course!", @"")
   172                                              otherButtonTitles:nil];
   174                                              otherButtonTitles:nil];
   173             [actionSheet showInView:(IS_IPAD() ? self.view : UIVIEW_HW_SDLVIEW)];
   175             [actionSheet showInView:(IS_IPAD() ? self.view : SDL_getUikitView(HW_getSDLWindow()))];
   174             [actionSheet release];
   176             [actionSheet release];
   175 
   177 
   176             break;
   178             break;
   177         default:
   179         default:
   178             DLog(@"Warning: unset case value in section!");
   180             DLog(@"Warning: unset case value in section!");