Improve gamepad navigation on settings page

This commit is contained in:
Cameron Gutman
2019-05-19 10:16:54 -07:00
parent 97fb30cdf1
commit 65c21f3392
4 changed files with 25 additions and 40 deletions
+4 -2
View File
@@ -25,11 +25,13 @@ Flickable {
}
StackView.onActivated: {
SdlGamepadKeyNavigation.setSettingsMode(true)
// This enables Tab and BackTab based navigation rather than arrow keys.
// It is required to shift focus between controls on the settings page.
SdlGamepadKeyNavigation.setUiNavMode(true)
}
StackView.onDeactivating: {
SdlGamepadKeyNavigation.setSettingsMode(false)
SdlGamepadKeyNavigation.setUiNavMode(false)
// Save the prefs so the Session can observe the changes
StreamingPreferences.save()