Skip to content

Commit

Permalink
Hide GLView when using the home button
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson committed Oct 20, 2020
1 parent 5f0672a commit 62a6eb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/iphone/MainMenuViewController.mm
Expand Up @@ -593,6 +593,12 @@ - (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)eve
}
}

- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
if (!context.previouslyFocusedView && [context.nextFocusedView isKindOfClass:[Banner_SubItem class]]) {
[ gAppDelegate HideGLView ];
}
}

#endif

@end
4 changes: 4 additions & 0 deletions code/iphone/MissionMenuViewController.mm
Expand Up @@ -464,6 +464,10 @@ - (void)setCellSelected:(BOOL)selected atIndexPath:(NSIndexPath*)indexPath {
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
NSLog(@"%@", context.nextFocusedView);

if (!context.previouslyFocusedView) {
[ gAppDelegate HideGLView ];
}

[super didUpdateFocusInContext:context withAnimationCoordinator:coordinator];

if ([context.nextFocusedView isKindOfClass:[idLabelButton class]]) {
Expand Down

0 comments on commit 62a6eb0

Please sign in to comment.