Permalink
Browse files

Fixed issue of touchable board while displaying pause modal

  • Loading branch information...
1 parent 10d049b commit 9652417dc306c45106d75660903d92db7e7c068f @mwcbrent mwcbrent committed Jan 4, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −1 concentration/ConcentrationViewController.m
  2. +0 −1 concentration/ScoreBoard.h
@@ -142,7 +142,8 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
}
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
- [self.board touchesBegan:touches withEvent:event];
+ if(self.board.enabled)
+ [self.board touchesBegan:touches withEvent:event];
}
#pragma mark - Game Events
@@ -164,12 +165,14 @@ - (void)showHelpOverlay
{
[self.view addSubview:self.helpOverlay.view];
[[NSNotificationCenter defaultCenter] postNotificationName:@"pauseTime" object:nil];
+ self.board.enabled = NO;
}
- (void)hideHelpOverlay
{
[self.helpOverlay.view removeFromSuperview];
[[NSNotificationCenter defaultCenter] postNotificationName:@"resumeTime" object:nil];
+ self.board.enabled = YES;
}
- (void)gameStart
@@ -17,7 +17,6 @@
@property (nonatomic, retain) UIButton *restartButton;
@property (nonatomic, retain) UIButton *helpButton;
@property (nonatomic, assign) NSDate *levelStartTime;
-@property (nonatomic, retain) NSDate *pauseStartTime;
@property (nonatomic, retain) NSTimer *clock;
@end

0 comments on commit 9652417

Please sign in to comment.