Fix gamepad menu focus and dismissal issues
This commit is contained in:
parent
48e78d2cd3
commit
8de42b3199
5 changed files with 36 additions and 7 deletions
|
|
@ -162,15 +162,24 @@ GridView {
|
|||
}
|
||||
}
|
||||
|
||||
Keys.onMenuPressed: {
|
||||
if (model.running) {
|
||||
// This will primarily be keyboard/gamepad driven so use
|
||||
// open() instead of popup()
|
||||
appContextMenu.open()
|
||||
}
|
||||
}
|
||||
|
||||
function doQuitGame() {
|
||||
quitAppDialog.appName = appModel.getRunningAppName()
|
||||
quitAppDialog.segueToStream = false
|
||||
quitAppDialog.open()
|
||||
}
|
||||
|
||||
Menu {
|
||||
NavigableMenu {
|
||||
id: appContextMenu
|
||||
NavigableMenuItem {
|
||||
parentMenu: appContextMenu
|
||||
text: model.running ? "Resume Game" : "Launch Game"
|
||||
onTriggered: {
|
||||
appContextMenu.close()
|
||||
|
|
@ -178,6 +187,7 @@ GridView {
|
|||
}
|
||||
}
|
||||
NavigableMenuItem {
|
||||
parentMenu: appContextMenu
|
||||
text: "Quit Game"
|
||||
onTriggered: doQuitGame()
|
||||
visible: model.running
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue