From 91a46c5828f8c045ec3f1b9b9f7b372833cd5351 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 7 Dec 2023 14:45:45 -0300 Subject: [PATCH] joystick-config-view: Rework input updating modal --- src/views/ConfigurationJoystickView.vue | 116 ++++++++++++------------ 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/src/views/ConfigurationJoystickView.vue b/src/views/ConfigurationJoystickView.vue index 362b2f507..e082dc598 100644 --- a/src/views/ConfigurationJoystickView.vue +++ b/src/views/ConfigurationJoystickView.vue @@ -107,17 +107,59 @@ - - - Update mapping + + +

Input mapping

-
+
+

Button mapping

+
+
+ + {{ remappingInput ? 'Remapping' : 'Click to remap' }} + +

{{ buttonRemappingText }}

+
+
+
+
+ {{ protocol }} +
+ +
+
+
+
+
+
+

Axis mapping

+
{{ [JoystickAxis.A0, JoystickAxis.A2].includes(input.id) ? 'mdi-pan-horizontal' : 'mdi-pan-vertical' }}
-
-
- Calibrate -

- {{ - remappingInput - ? 'Click the button you want to use for this input.' - : justRemappedInput === undefined - ? '' - : justRemappedInput - ? 'Input remapped.' - : 'No input detected.' - }} -

- - {{ remappingInput ? 'Remapping' : 'Remap button' }} - -
-
- Assign -
-
- {{ protocol }} -
- -
-
-
-
-
@@ -331,4 +323,14 @@ watch(controllerStore.joysticks, () => { } currentModifierKey.value = activeModKeys[0] }) + +const buttonRemappingText = computed(() => { + return remappingInput.value + ? 'Click the button you want to use for this input.' + : justRemappedInput.value === undefined + ? '' + : justRemappedInput.value + ? 'Input remapped.' + : 'No input detected.' +})