mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-27 10:50:57 +01:00
android: Add relative stick center toggle
This commit is contained in:
parent
63819af214
commit
bebc822334
3 changed files with 13 additions and 0 deletions
|
@ -222,6 +222,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
|
||||
popup.menuInflater.inflate(R.menu.menu_overlay_options, popup.menu)
|
||||
|
||||
popup.menu.findItem(R.id.menu_rel_stick_center).isChecked = EmulationMenuSettings.joystickRelCenter
|
||||
|
||||
popup.setOnMenuItemClickListener {
|
||||
when (it.itemId) {
|
||||
R.id.menu_edit_overlay -> {
|
||||
|
@ -259,6 +261,11 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
|
||||
true
|
||||
}
|
||||
R.id.menu_rel_stick_center -> {
|
||||
it.isChecked = !it.isChecked
|
||||
EmulationMenuSettings.joystickRelCenter = it.isChecked
|
||||
true
|
||||
}
|
||||
R.id.menu_reset_overlay -> {
|
||||
binding.drawerLayout.close()
|
||||
resetInputOverlay()
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
android:id="@+id/menu_toggle_controls"
|
||||
android:title="@string/emulation_toggle_controls" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_rel_stick_center"
|
||||
android:title="@string/emulation_rel_stick_center"
|
||||
android:checkable="true" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_reset_overlay"
|
||||
android:title="@string/emulation_touch_overlay_reset" />
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
<string name="emulation_exit">Exit Emulation</string>
|
||||
<string name="emulation_done">Done</string>
|
||||
<string name="emulation_toggle_controls">Toggle Controls</string>
|
||||
<string name="emulation_rel_stick_center">Relative Stick Center</string>
|
||||
<string name="emulation_toggle_all">Toggle All</string>
|
||||
<string name="emulation_control_scale">Adjust Scale</string>
|
||||
<string name="emulation_touch_overlay_reset">Reset Overlay</string>
|
||||
|
|
Loading…
Reference in a new issue