mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 11:20:03 +02:00
updated menu stack
This commit is contained in:
parent
2a97ebb076
commit
b50bc99cbd
2 changed files with 16 additions and 3 deletions
|
@ -64,6 +64,7 @@ FocusScope {
|
|||
// navigate back to root level menu
|
||||
onClicked: {
|
||||
buildMenu();
|
||||
breadcrumbText.text = "Menu";
|
||||
tabletRoot.playButtonClickSound();
|
||||
}
|
||||
}
|
||||
|
@ -106,10 +107,13 @@ FocusScope {
|
|||
|
||||
function setRootMenu(menu) {
|
||||
tabletMenu.rootMenu = menu
|
||||
buildMenu()
|
||||
buildMenu();
|
||||
}
|
||||
function buildMenu() {
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> updated menu stack
|
||||
// Build submenu if specified.
|
||||
if (subMenu !== "") {
|
||||
var index = 0;
|
||||
|
@ -122,15 +126,19 @@ FocusScope {
|
|||
}
|
||||
subMenu = ""; // Continue with full menu after initially displaying submenu.
|
||||
if (found) {
|
||||
menuPopperUpper.popup(tabletMenu, rootMenu.items[index].items);
|
||||
menuPopperUpper.popup(rootMenu.items[index].items);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise build whole menu.
|
||||
<<<<<<< HEAD
|
||||
menuPopperUpper.popup(tabletMenu, rootMenu.items);
|
||||
=======
|
||||
menuPopperUpper.popup(rootMenu.items);
|
||||
>>>>>>> updating branch with master
|
||||
=======
|
||||
menuPopperUpper.popup(rootMenu.items);
|
||||
>>>>>>> updated menu stack
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,12 +27,13 @@ Item {
|
|||
d.clearMenus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StackView {
|
||||
anchors.fill: parent
|
||||
id: d
|
||||
objectName: "stack"
|
||||
initialItem: topMenu
|
||||
|
||||
property var menuStack: []
|
||||
property var topMenu: null;
|
||||
property var modelMaker: Component { ListModel { } }
|
||||
|
@ -57,9 +58,13 @@ Item {
|
|||
}
|
||||
|
||||
function pushSource(path) {
|
||||
d.push(Qt.resolvedUrl(path));
|
||||
d.currentItem.eventBridge = tabletMenu.eventBridge
|
||||
d.currentItem.sendToScript.connect(tabletMenu.sendToScript);
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
d.pop();
|
||||
}
|
||||
|
||||
function toModel(items) {
|
||||
|
|
Loading…
Reference in a new issue