project_files/HedgewarsMobile/Classes/InGameMenuViewController.m
branchhedgeroid
changeset 6224 42b256eca362
parent 6078 8c0cc07731e5
child 6260 025d50a6aeb0
equal deleted inserted replaced
6055:88cfcd9161d3 6224:42b256eca362
    18  * File created on 25/03/2010.
    18  * File created on 25/03/2010.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "InGameMenuViewController.h"
    22 #import "InGameMenuViewController.h"
    23 #import "PascalImports.h"
       
    24 #import "CommodityFunctions.h"
       
    25 #import "SDL_sysvideo.h"
    23 #import "SDL_sysvideo.h"
    26 #import "SDL_uikitkeyboard.h"
    24 #import "SDL_uikitkeyboard.h"
    27 #import "OpenGLES/ES1/gl.h"
    25 
    28 
    26 
    29 #define VIEW_HEIGHT 200
    27 #define VIEW_HEIGHT 200
    30 
    28 
    31 @implementation InGameMenuViewController
    29 @implementation InGameMenuViewController
    32 @synthesize menuList;
    30 @synthesize menuList;
    88         [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.35];
    86         [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.35];
    89     }
    87     }
    90 
    88 
    91     SDL_iPhoneKeyboardHide((SDL_Window *)HW_getSDLWindow());
    89     SDL_iPhoneKeyboardHide((SDL_Window *)HW_getSDLWindow());
    92 
    90 
       
    91     /*
    93     if (shouldTakeScreenshot) {
    92     if (shouldTakeScreenshot) {
    94         UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please wait"
    93         UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please wait"
    95                                                         message:nil
    94                                                         message:nil
    96                                                        delegate:nil
    95                                                        delegate:nil
    97                                               cancelButtonTitle:nil
    96                                               cancelButtonTitle:nil
   105         [indicator release];
   104         [indicator release];
   106 
   105 
   107         // all these hacks because of the PAUSE caption on top of everything...
   106         // all these hacks because of the PAUSE caption on top of everything...
   108         [self performSelector:@selector(saveCurrentScreenToPhotoAlbum:) withObject:alert afterDelay:0.3];
   107         [self performSelector:@selector(saveCurrentScreenToPhotoAlbum:) withObject:alert afterDelay:0.3];
   109     }
   108     }
       
   109     */
   110     shouldTakeScreenshot = NO;
   110     shouldTakeScreenshot = NO;
   111 }
   111 }
   112 
   112 
   113 #pragma mark -
   113 #pragma mark -
   114 #pragma mark tableView methods
   114 #pragma mark tableView methods
   190         HW_terminate(NO);
   190         HW_terminate(NO);
   191     }
   191     }
   192 }
   192 }
   193 
   193 
   194 //TODO: check this is still needed since we switched to SDL_GL_CreateContext()
   194 //TODO: check this is still needed since we switched to SDL_GL_CreateContext()
       
   195 /*
   195 #pragma mark -
   196 #pragma mark -
   196 #pragma mark save screenshot
   197 #pragma mark save screenshot
   197 //by http://www.bit-101.com/blog/?p=1861
   198 //by http://www.bit-101.com/blog/?p=1861
   198 // callback for CGDataProviderCreateWithData
   199 // callback for CGDataProviderCreateWithData
   199 void releaseData(void *info, const void *data, size_t dataSize) {
   200 void releaseData(void *info, const void *data, size_t dataSize) {
   245     CGImageRelease(imageRef);
   246     CGImageRelease(imageRef);
   246 
   247 
   247     // add callback for cleaning memory and removing alert
   248     // add callback for cleaning memory and removing alert
   248     UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), (void *)alert);
   249     UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), (void *)alert);
   249 }
   250 }
   250 
   251 */
   251 
   252 
   252 @end
   253 @end