updated iOS UI issues:
* fixed status bar issue on iOS7, where status bar information was invisible on iOS7 devices * fixed some font issues on the Shop screens to make them more legible for iOS users. ( changed font size for Interactive Buttons and card list) * added new gesture for opening up the menu screen for iOS. Since there are no external buttons on iOS devices, we need either on-screen buttons or gestures to compensate. Using the pinch or zoom gesture will simulate pressing the "MENU" button on the PSP on all screens now. Not ideal, but something for now until we can work in a new button or way to open up the menu.
This commit is contained in:
+18
-4
@@ -166,11 +166,12 @@ void DestroyGame(void)
|
||||
[menuKeyRecognizer requireGestureRecognizerToFail: selectKeyRecognizer];
|
||||
[self addGestureRecognizer:menuKeyRecognizer];
|
||||
|
||||
/*
|
||||
// initialize the scaling factor
|
||||
lastScale = 1.f;
|
||||
UIPinchGestureRecognizer *pinchZoomRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinchZoom:)];
|
||||
[self addGestureRecognizer:pinchZoomRecognizer];
|
||||
[pinchZoomRecognizer release];
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Create a single tap recognizer to select the nearest object.
|
||||
@@ -391,8 +392,6 @@ void DestroyGame(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
||||
{
|
||||
return YES;
|
||||
@@ -425,6 +424,21 @@ void DestroyGame(void)
|
||||
}
|
||||
|
||||
#pragma mark Gesture Recognizer callbacks
|
||||
- (void)handlePinchZoom: (UIPinchGestureRecognizer *) pinchGesture {
|
||||
[[[pinchGesture view] layer] removeAllAnimations];
|
||||
CGFloat currentScaleFactor = [pinchGesture scale];
|
||||
|
||||
if (pinchGesture.state == UIGestureRecognizerStateEnded) {
|
||||
if (lastScale < 1.3f) {
|
||||
lastScale *= currentScaleFactor;
|
||||
}
|
||||
else {
|
||||
lastScale = 1;
|
||||
[self displayGameMenu];
|
||||
}
|
||||
pinchGesture.scale = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handlePanMotion: (UIPanGestureRecognizer *) panGesture
|
||||
{
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
NSLog(@"EAGL ViewController - view Did Load");
|
||||
|
||||
[super viewDidLoad];
|
||||
}
|
||||
|
||||
@@ -56,7 +55,6 @@
|
||||
[self.view resumeGame];
|
||||
}
|
||||
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
[self.view pauseGame];
|
||||
@@ -77,6 +75,10 @@
|
||||
[self.view endGame];
|
||||
}
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle {
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
|
||||
NSLog(@"EAGL ViewController - view Did Appear");
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "JFileSystem.h"
|
||||
#include "JRenderer.h"
|
||||
#include "JGameLauncher.h"
|
||||
#include "UIScreen+Util.h"
|
||||
|
||||
#define ACTUAL_SCREEN_WIDTH (SCREEN_WIDTH)
|
||||
#define ACTUAL_SCREEN_HEIGHT (SCREEN_HEIGHT)
|
||||
@@ -61,7 +62,7 @@ bool checkFramebufferStatus();
|
||||
// for retina devices. because of the 568 px, the ratio between height-width skews the
|
||||
// frame a bit
|
||||
|
||||
if ( backingHeight == 568 || backingWidth == 568) {
|
||||
if ( [UIScreen isRetinaDisplay]) {
|
||||
viewPort.left = 0;
|
||||
viewPort.top = -((backingWidth/ACTUAL_RATIO)-backingHeight)/2 + 22; // account for status bar
|
||||
viewPort.right = backingWidth;
|
||||
|
||||
Reference in New Issue
Block a user