fixed some click issues found with iOS port.

This commit is contained in:
techdragon.nguyen@gmail.com
2012-01-07 16:35:39 +00:00
parent a28c90dacf
commit 436f95dfec
4 changed files with 19 additions and 16 deletions

View File

@@ -150,7 +150,7 @@ bool JGuiController::CheckUserInput(JButton key)
}
else
{ // a dude may have clicked somewhere, we're gonna select the closest object from where he clicked
int x, y;
int x = -1, y = -1;
unsigned int distance2;
unsigned int minDistance2 = -1;
int n = mCurr;
@@ -175,6 +175,11 @@ bool JGuiController::CheckUserInput(JButton key)
mCurr = n;
mObjects[mCurr]->Entering();
}
// if the same object was selected process click
else if (n == mCurr && mObjects[mCurr] != NULL && mObjects[mCurr]->Leaving(JGE_BTN_OK))
{
mObjects[mCurr]->Entering();
}
mEngine->LeftClickedProcessed();
return true;
}