final change for 0.17 to sync up with other platforms. focused targeted touch of ui objects to deck menus.

This commit is contained in:
techdragon.nguyen@gmail.com
2012-01-10 19:53:10 +00:00
parent 9161136797
commit adc3e4b689
6 changed files with 24 additions and 13 deletions

View File

@@ -145,6 +145,22 @@ bool DeckMenuItem::ButtonPressed()
return SimpleMenuItem::ButtonPressed();
}
void DeckMenuItem::checkUserClick()
{
int x1 = -1, y1 = -1;
if (mEngine->GetLeftClickCoordinates(x1, y1))
{
mIsValidSelection = false;
int x2 = static_cast<int>(mXOffset), y2 = static_cast<int>(mY + mYOffset);
if ( (x1 >= x2) && (x1 <= (x2 + 200)) && (y1 >= y2) && (y1 < (y2 + 30)))
mIsValidSelection = true;
}
else
mIsValidSelection = true;
}
// Accessors
float DeckMenuItem::GetWidth()
{
WFont * mFont = WResourceManager::Instance()->GetWFont(fontId);