Gamebar: Implement "no action" in gesture quick actions menu

Signed-off-by: kenway214 <kenway214@outlook.com>
This commit is contained in:
kenway214
2025-11-03 02:10:47 +05:30
parent f02dbfe9fc
commit 71cdb5b6a2
2 changed files with 6 additions and 1 deletions

View File

@@ -80,12 +80,14 @@
<!-- Gesture Functions -->
<string-array name="gesture_function_entries">
<item>No Action</item>
<item>Toggle Full/Minimal Format</item>
<item>Start/Stop Log Capture</item>
<item>Open GameBar Settings</item>
<item>Take Screenshot</item>
</string-array>
<string-array name="gesture_function_values">
<item>no_action</item>
<item>toggle_format</item>
<item>capture_logs</item>
<item>open_settings</item>

View File

@@ -130,7 +130,7 @@ class GameBar private constructor(context: Context) {
private var doubleTapFunction = "capture_logs"
private var longPressFunction = "open_settings"
private var bgDrawable: GradientDrawable? = null
private var itemSpacingDp = 8
private var layoutChanged = false
@@ -165,6 +165,9 @@ class GameBar private constructor(context: Context) {
private fun executeGestureFunction(function: String) {
when (function) {
"no_action" -> {
// Do nothing
}
"toggle_format" -> {
overlayFormat = if (overlayFormat == "full") "minimal" else "full"
PreferenceManager.getDefaultSharedPreferences(context)