Issue 565: This fixes the issue with the MENU not popping up ingame. The bug was caused when user canceled out of a deck selection screen to either go back to the Player Deck Selection or Main Menu. The buffer was not cleared properly. added call to reset buffer in GameStateDuel to follow pattern used in GameStateDeckViewer.
This commit is contained in:
@@ -383,6 +383,11 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
|
||||
return newLocation;
|
||||
}
|
||||
|
||||
-(void)resetInput
|
||||
{
|
||||
g_engine->ResetInput();
|
||||
}
|
||||
|
||||
|
||||
- (void)handlePanMotion: (UIPanGestureRecognizer *) panGesture
|
||||
{
|
||||
@@ -404,6 +409,7 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
|
||||
{
|
||||
CGPoint v2 = [panGesture velocityInView: self];
|
||||
BOOL isVerticalSwipe = (fabsf(v2.x) > fabsf( v2.y)) ? NO : YES;
|
||||
g_engine->LeftClicked(-1, -1);
|
||||
|
||||
if ( !isVerticalSwipe )
|
||||
{
|
||||
@@ -419,6 +425,8 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
|
||||
else
|
||||
g_engine->HoldKey_NoRepeat( JGE_BTN_DOWN );
|
||||
}
|
||||
[self performSelector: @selector(resetInput) withObject: nil afterDelay: 0.1];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -498,12 +506,14 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
|
||||
{
|
||||
g_engine->HoldKey_NoRepeat(JGE_BTN_CTRL);
|
||||
}
|
||||
[self performSelector:@selector(resetInput) withObject: nil afterDelay: 0.1];
|
||||
}
|
||||
|
||||
- (void)displayGameMenu
|
||||
{
|
||||
g_engine->LeftClicked(-1, -1); // set the click pressed to offscreen
|
||||
g_engine->HoldKey_NoRepeat( JGE_BTN_MENU);
|
||||
[self performSelector:@selector(resetInput) withObject: nil afterDelay: 0.1];
|
||||
}
|
||||
|
||||
- (void)handleMenuWithLongPress:(UILongPressGestureRecognizer *)recognizer {
|
||||
|
||||
@@ -186,6 +186,8 @@ void GameStateDuel::Start()
|
||||
}
|
||||
deckmenu->Add(MENUITEM_CANCEL, "Main Menu", "Return to Main Menu");
|
||||
}
|
||||
|
||||
mEngine->ResetInput();
|
||||
}
|
||||
|
||||
void GameStateDuel::initRand(unsigned int seed)
|
||||
@@ -710,7 +712,8 @@ void GameStateDuel::Render()
|
||||
mFont->SetColor(ARGB(255,255,255,255));
|
||||
mFont->DrawString(buffer, SCREEN_WIDTH / 2, 0, JGETEXT_CENTER);
|
||||
}
|
||||
if (menu) menu->Render();
|
||||
if (menu)
|
||||
menu->Render();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2560,7 +2560,7 @@
|
||||
armv6,
|
||||
"$(ARCHS_STANDARD_32_BIT)",
|
||||
);
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution: Michael Nguyen";
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
@@ -2590,7 +2590,7 @@
|
||||
"-Wl",
|
||||
);
|
||||
PRODUCT_NAME = wagic;
|
||||
PROVISIONING_PROFILE = "6877A0A0-FD2E-42FA-823A-7CD9B1E8E864";
|
||||
PROVISIONING_PROFILE = "";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
|
||||
Reference in New Issue
Block a user