Skip to content

Commit

Permalink
Fix controller navigation for 2 edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
streetpea committed Dec 17, 2024
1 parent 7c52921 commit 356f697
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gui/src/qml/SettingsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ DialogView {
CheckBox {
property bool firstInFocusChain: false
property bool lastInFocusChain: false
property bool lastDownInFocusChain: index > consolesView.count + hiddenConsolesView.count - 2

id: autoConnectButton
anchors {
Expand Down Expand Up @@ -1217,7 +1218,7 @@ DialogView {
}
break;
case Qt.Key_Down:
if (!lastInFocusChain) {
if (!lastDownInFocusChain) {
let item = nextItemInFocusChain();
if (item)
item.forceActiveFocus(Qt.TabFocusReason);
Expand Down Expand Up @@ -1623,6 +1624,7 @@ DialogView {
text: qsTr("Dpad Touchpad Emulation")
}
C.CheckBox {
id: dpadTouch
checked: Chiaki.settings.dpadTouchEnabled
onToggled: Chiaki.settings.dpadTouchEnabled = !Chiaki.settings.dpadTouchEnabled
}
Expand Down Expand Up @@ -1777,7 +1779,12 @@ DialogView {
checked: Chiaki.settings.buttonsByPosition
onToggled: Chiaki.settings.buttonsByPosition = checked
KeyNavigation.priority: KeyNavigation.BeforeItem
KeyNavigation.up: dpadShortcut1
KeyNavigation.up: {
if(dpadShortcut1.visible)
dpadShortcut1
else
dpadTouch;
}
KeyNavigation.down: posButtons
KeyNavigation.left: posButtons
KeyNavigation.right: posButtons
Expand Down

0 comments on commit 356f697

Please sign in to comment.