enable tooltips on ipad (todo: disable them on iphone)
authorkoda
Wed, 07 Jul 2010 03:16:12 +0200
changeset 3628 2b4d878ba565
parent 3627 f1da1d8fb56c
child 3629 86212d2b116a
enable tooltips on ipad (todo: disable them on iphone)
hedgewars/hwengine.pas
hedgewars/uStore.pas
project_files/HedgewarsMobile/Classes/OverlayViewController.m
project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
--- a/hedgewars/hwengine.pas	Wed Jul 07 03:03:59 2010 +0200
+++ b/hedgewars/hwengine.pas	Wed Jul 07 03:16:12 2010 +0200
@@ -453,8 +453,8 @@
             val(ParamStr(5), ipcPort);
             cFullScreen:= ParamStr(6) = '1';
             isSoundEnabled:= ParamStr(7) = '1';
-            cVSyncInUse:= ParamStr(8) = '1';
-            cWeaponTooltips:= ParamStr(9) = '1';
+            cVSyncInUse:= ParamStr(8) = '1';        //unused
+            cWeaponTooltips:= ParamStr(9) = '1';    //should be merged with rqFlags
             cLocaleFName:= ParamStr(10);
             val(ParamStr(11), cInitVolume);
             val(ParamStr(12), cTimerInterval);
--- a/hedgewars/uStore.pas	Wed Jul 07 03:03:59 2010 +0200
+++ b/hedgewars/uStore.pas	Wed Jul 07 03:16:12 2010 +0200
@@ -1502,7 +1502,6 @@
 end;
 
 procedure RenderWeaponTooltip(atype: TAmmoType);
-{$IFNDEF IPHONEOS}
 var r: TSDL_Rect;
     i: LongInt;
     extra: ansistring;
@@ -1548,28 +1547,21 @@
 // render window and return the texture
 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r)
 end;
-{$ELSE}
-begin end;
-{$ENDIF}
 
 procedure ShowWeaponTooltip(x, y: LongInt);
 begin
-{$IFNDEF IPHONEOS}
 // draw the texture if it exists
 if WeaponTooltipTex <> nil then
     DrawTexture(x, y, WeaponTooltipTex)
-{$ENDIF}
 end;
 
 procedure FreeWeaponTooltip;
 begin
-{$IFNDEF IPHONEOS}
 // free the existing texture (if there's any)
 if WeaponTooltipTex = nil then
     exit;
 FreeTexture(WeaponTooltipTex);
 WeaponTooltipTex:= nil
-{$ENDIF}
 end;
 
 procedure initModule;
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Wed Jul 07 03:03:59 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Wed Jul 07 03:16:12 2010 +0200
@@ -113,7 +113,6 @@
     self.view.center = CGPointMake(self.view.frame.size.height/2.0, self.view.frame.size.width/2.0);
     
     // set initial orientation
-    ///[self didRotate:[NSNotification notificationWithName:UIDeviceOrientationDidChangeNotification object:nil]];
     UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
     UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:12345];
     switch (orientation) {
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Wed Jul 07 03:03:59 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Wed Jul 07 03:16:12 2010 +0200
@@ -98,10 +98,9 @@
     free(gameArgs);
     
     // bring the uiwindow below in front
-    UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
-    [aWin makeKeyAndVisible];
-    
-    DLog(@"%@",[[UIApplication sharedApplication] windows]);
+    //UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
+    //[aWin makeKeyAndVisible];
+    //DLog(@"%@",[[UIApplication sharedApplication] windows]);
     
     [UIView beginAnimations:@"inserting main controller" context:NULL];
     [UIView setAnimationDuration:1];