android: Expose touchscreen toggle
This commit is contained in:
parent
278cafb76c
commit
aa4d15594f
3 changed files with 13 additions and 0 deletions
|
@ -539,6 +539,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
findItem(R.id.menu_show_overlay).isChecked =
|
findItem(R.id.menu_show_overlay).isChecked =
|
||||||
BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()
|
BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()
|
||||||
findItem(R.id.menu_haptics).isChecked = BooleanSetting.HAPTIC_FEEDBACK.getBoolean()
|
findItem(R.id.menu_haptics).isChecked = BooleanSetting.HAPTIC_FEEDBACK.getBoolean()
|
||||||
|
findItem(R.id.menu_touchscreen).isChecked = BooleanSetting.TOUCHSCREEN.getBoolean()
|
||||||
}
|
}
|
||||||
|
|
||||||
popup.setOnMenuItemClickListener {
|
popup.setOnMenuItemClickListener {
|
||||||
|
@ -628,6 +629,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
R.id.menu_touchscreen -> {
|
||||||
|
it.isChecked = !it.isChecked
|
||||||
|
BooleanSetting.TOUCHSCREEN.setBoolean(it.isChecked)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
R.id.menu_reset_overlay -> {
|
R.id.menu_reset_overlay -> {
|
||||||
binding.drawerLayout.close()
|
binding.drawerLayout.close()
|
||||||
resetInputOverlay()
|
resetInputOverlay()
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
android:title="@string/emulation_haptics"
|
android:title="@string/emulation_haptics"
|
||||||
android:checkable="true" />
|
android:checkable="true" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_touchscreen"
|
||||||
|
android:title="@string/touchscreen"
|
||||||
|
android:checkable="true" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_reset_overlay"
|
android:id="@+id/menu_reset_overlay"
|
||||||
android:title="@string/emulation_touch_overlay_reset" />
|
android:title="@string/emulation_touch_overlay_reset" />
|
||||||
|
|
|
@ -366,6 +366,7 @@
|
||||||
<string name="emulation_pause">Pause emulation</string>
|
<string name="emulation_pause">Pause emulation</string>
|
||||||
<string name="emulation_unpause">Unpause emulation</string>
|
<string name="emulation_unpause">Unpause emulation</string>
|
||||||
<string name="emulation_input_overlay">Overlay options</string>
|
<string name="emulation_input_overlay">Overlay options</string>
|
||||||
|
<string name="touchscreen">Touchscreen</string>
|
||||||
|
|
||||||
<string name="load_settings">Loading settings…</string>
|
<string name="load_settings">Loading settings…</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue