# HG changeset patch # User koda # Date 1278465372 -7200 # Node ID 2b4d878ba565aa7b61661e03ec7cb2ef06f842a9 # Parent f1da1d8fb56cd50045e92d0110fc3cce46daf9e7 enable tooltips on ipad (todo: disable them on iphone) diff -r f1da1d8fb56c -r 2b4d878ba565 hedgewars/hwengine.pas --- 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); diff -r f1da1d8fb56c -r 2b4d878ba565 hedgewars/uStore.pas --- 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; diff -r f1da1d8fb56c -r 2b4d878ba565 project_files/HedgewarsMobile/Classes/OverlayViewController.m --- 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) { diff -r f1da1d8fb56c -r 2b4d878ba565 project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m --- 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];