Activated mouse tracking in option and award menus. Activated offset support in SimpleMenu, it should help for issue 674

This commit is contained in:
Xawotihs
2011-06-04 16:22:45 +00:00
parent 715d498bce
commit 4bf255596f
5 changed files with 17 additions and 9 deletions

View File

@@ -901,14 +901,14 @@ bool WGuiMenu::CheckUserInput(JButton key)
{
WGuiItem* pItem = (WGuiItem*)items[k];
distance2 = static_cast<unsigned int>((pItem->getY() - j) * (pItem->getY() - j) + (pItem->getX() - i) * (pItem->getX() - i));
if (distance2 < minDistance2)
if (distance2 < minDistance2 && pItem->Selectable())
{
minDistance2 = distance2;
n = k;
}
}
if (n != currentItem)
if (n != currentItem && items[n]->Selectable())
{
setSelected(n);
mEngine->LeftClickedProcessed();
@@ -947,6 +947,8 @@ bool WGuiMenu::CheckUserInput(JButton key)
if (currentItem >= 0 && currentItem < nbitems) result = items[currentItem]->CheckUserInput(key);
mEngine->LeftClickedProcessed();
return result;
}
void WGuiMenu::syncMove()