# HG changeset patch # User koda # Date 1295388527 -3600 # Node ID 2480ab32505773761a2a09e4e216ca4ca4120abc # Parent 881c8232b66af45e644738b2abcf1988508288c8 when multiple fingers are detected, remove all widgets in order to avoid accidental commands diff -r 881c8232b66a -r 2480ab325057 project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Tue Jan 18 22:55:58 2011 +0100 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Tue Jan 18 23:08:47 2011 +0100 @@ -35,7 +35,8 @@ #define doDim() [dimTimer setFireDate: (IS_DUALHEAD()) ? HIDING_TIME_NEVER : HIDING_TIME_DEFAULT] #define doNotDim() [dimTimer setFireDate:HIDING_TIME_NEVER] -#define removeConfirmationInput() [[self.view viewWithTag:CONFIRMATION_TAG] removeFromSuperview]; +#define removeInputWidget() [[self.view viewWithTag:CONFIRMATION_TAG] removeFromSuperview]; \ + [[self.view viewWithTag:GRENADE_TAG] removeFromSuperview]; @implementation OverlayViewController @synthesize popoverController, popupMenu, helpPage, amvc, isNetGame, useClassicMenu, initialOrientation, containerWindow; @@ -210,6 +211,8 @@ [UIView setAnimationDuration:2]; self.view.alpha = 1; [UIView commitAnimations]; + + doDim(); } -(void) numberOfScreensIncreased { @@ -401,13 +404,13 @@ doDim(); [self.amvc disappear]; } - removeConfirmationInput(); + removeInputWidget(); [self showPopover]; break; case 11: playSound(@"clickSound"); clearView(); - removeConfirmationInput(); + removeInputWidget(); if (IS_DUALHEAD() || self.useClassicMenu == NO) { if (self.amvc == nil) @@ -439,7 +442,7 @@ -(void) sendHWClick { HW_click(); - removeConfirmationInput(); + removeInputWidget(); doDim(); } @@ -541,11 +544,13 @@ // reset default dimming doDim(); + // remove other widgets + removeInputWidget(); + HW_setPianoSound([allTouches count]); switch ([allTouches count]) { case 1: - removeConfirmationInput(); startingPoint = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view]; if (2 == [[[allTouches allObjects] objectAtIndex:0] tapCount]) HW_zoomReset(); diff -r 881c8232b66a -r 2480ab325057 project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Tue Jan 18 22:55:58 2011 +0100 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Tue Jan 18 23:08:47 2011 +0100 @@ -1576,7 +1576,7 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* Test Lua */ = { + 1D6058900D05DD3D006BFB54 /* Hedgewars */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Hedgewars" */; buildPhases = ( @@ -1667,7 +1667,7 @@ ); projectRoot = ""; targets = ( - 1D6058900D05DD3D006BFB54 /* Test Lua */, + 1D6058900D05DD3D006BFB54 /* Hedgewars */, 928301160F10CAFC00CC5A3C /* fpc */, 6179928B114AE0C800BA94A9 /* UpdateDataFolder */, );