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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user