project_files/HedgewarsMobile/Classes/ObjcExports.m
changeset 6409 ca93f38a1aab
parent 6259 02765411a912
child 6615 65602f1ef0f8
equal deleted inserted replaced
6407:f63b2330147a 6409:ca93f38a1aab
    21 
    21 
    22 #import "ObjcExports.h"
    22 #import "ObjcExports.h"
    23 #import "OverlayViewController.h"
    23 #import "OverlayViewController.h"
    24 #import "AmmoMenuViewController.h"
    24 #import "AmmoMenuViewController.h"
    25 
    25 
    26 //FIXME: add a proper #import when this is exposed in SDL
       
    27 extern UIView *SDL_getUikitView(void *);
       
    28 
    26 
    29 // cache the grenade time
    27 // cache the grenade time
    30 static NSInteger grenadeTime;
    28 static NSInteger grenadeTime;
    31 // the reference to the newMenu instance
    29 // the reference to the newMenu instance
    32 static OverlayViewController *overlay_instance;
    30 static OverlayViewController *overlay_instance;
    53 void startLoadingIndicator() {
    51 void startLoadingIndicator() {
    54     // this is the first ojbc function called by engine, so we have to initialize some variables here
    52     // this is the first ojbc function called by engine, so we have to initialize some variables here
    55     overlay_instance = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
    53     overlay_instance = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
    56     // in order to get rotation events we have to insert the view inside the first view of the second window
    54     // in order to get rotation events we have to insert the view inside the first view of the second window
    57     //TODO: when multihead make sure that overlay is displayed in the touch-enabled window
    55     //TODO: when multihead make sure that overlay is displayed in the touch-enabled window
    58     [SDL_getUikitView(HW_getSDLWindow()) addSubview:overlay_instance.view];
    56     [[HWUtils mainSDLViewInstance] addSubview:overlay_instance.view];
    59     grenadeTime = 2;
    57     grenadeTime = 2;
    60 
    58 
    61     if ([HWUtils gameType] == gtSave) {
    59     if ([HWUtils gameType] == gtSave) {
    62         [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
    60         [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
    63 
    61