Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add header descriptions for dpad axis and buttons
Browse files Browse the repository at this point in the history
DavidRGriswold committed Sep 23, 2024
1 parent 6335cb6 commit 06a728a
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -78,15 +78,6 @@ class InputBindingSetting(

else -> false
}

fun isDpadButtons(): Boolean =
when (abstractSetting.key) {
Settings.KEY_BUTTON_DOWN,
Settings.KEY_BUTTON_LEFT,
Settings.KEY_BUTTON_UP,
Settings.KEY_BUTTON_RIGHT -> true
else -> false
}
/**
* Returns true if this key is for the 3DS L/R or ZL/ZR buttons. Note, these are not real
* triggers on the 3DS, but we support them as such on a physical gamepad.
Original file line number Diff line number Diff line change
@@ -621,12 +621,12 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
add(InputBindingSetting(button, Settings.axisTitles[i]))
}

add(HeaderSetting(R.string.controller_dpad_axis))
add(HeaderSetting(R.string.controller_dpad_axis,R.string.controller_dpad_axis_description))
Settings.dPadAxisKeys.forEachIndexed { i: Int, key: String ->
val button = getInputObject(key)
add(InputBindingSetting(button, Settings.axisTitles[i]))
}
add(HeaderSetting(R.string.controller_dpad_button))
add(HeaderSetting(R.string.controller_dpad_button,R.string.controller_dpad_button_description))
Settings.dPadButtonKeys.forEachIndexed { i: Int, key: String ->
val button = getInputObject(key)
add(InputBindingSetting(button, Settings.dPadTitles[i]))
2 changes: 2 additions & 0 deletions src/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -109,7 +109,9 @@
<string name="controller_trigger">Trigger</string>
<string name="controller_dpad">D-Pad</string>
<string name="controller_dpad_axis">D-Pad (Axis)</string>
<string name="controller_dpad_axis_description">Some controllers will not be able to map their dpad as an axis. In that case, use the D-Pad (buttons) section below instead.</string>
<string name="controller_dpad_button">D-Pad (Buttons)</string>
<string name="controller_dpad_button_description">Only map these buttons if the D-Pad (Axis) settings above do not work with your controller.</string>
<string name="controller_axis_vertical">Up/Down Axis</string>
<string name="controller_axis_horizontal">Left/Right Axis</string>
<string name="direction_up">Up</string>

0 comments on commit 06a728a

Please sign in to comment.