mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
fixed bug with menu
This commit is contained in:
parent
baff07b0f9
commit
fa3bea52cd
3 changed files with 14 additions and 7 deletions
|
@ -108,12 +108,7 @@ FocusScope {
|
|||
}
|
||||
currentIndex = originalIndex;
|
||||
}
|
||||
|
||||
function previousItem() { currentIndex = (currentIndex + count - 1) % count; }
|
||||
function nextItem() { currentIndex = (currentIndex + count + 1) % count; }
|
||||
function selectCurrentItem() { if (currentIndex != -1) root.selected(currentItem.source); }
|
||||
function previousPage() { root.parent.pop(); }
|
||||
|
||||
|
||||
Keys.onUpPressed: previousItem();
|
||||
Keys.onDownPressed: nextItem();
|
||||
Keys.onSpacePressed: selectCurrentItem();
|
||||
|
@ -121,6 +116,13 @@ FocusScope {
|
|||
Keys.onReturnPressed: selectCurrentItem();
|
||||
Keys.onLeftPressed: previousPage();
|
||||
}
|
||||
|
||||
function previousItem() { listView.currentIndex = (listView.currentIndex + listView.count - 1) % listView.count; }
|
||||
function nextItem() { listView.currentIndex = (listView.currentIndex + listView.count + 1) % listView.count; }
|
||||
function selectCurrentItem() { if (listView.currentIndex != -1) root.selected(currentItem.source); }
|
||||
function previousPage() { root.parent.pop(); }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -171,4 +171,9 @@ Item {
|
|||
return false;
|
||||
}
|
||||
|
||||
function previousItem() { d.topMenu.previousItem(); }
|
||||
function nextItem() { d.topMenu.nextItem(); }
|
||||
function selectCurrentItem() { d.topMenu.selectCurrentItem(); }
|
||||
function previousPage() { d.topMenu.previousPage(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ QQuickItem* TabletProxy::getQmlMenu() const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
QQuickItem* menuList = VrMenu->findChild<QQuickItem*>("menuList");
|
||||
QQuickItem* menuList = VrMenu->findChild<QQuickItem*>("tabletMenuHandlerItem");
|
||||
if (!menuList) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue