From 171768e6170285f91581077c9ea5605c9184a7a0 Mon Sep 17 00:00:00 2001 From: Kode-Z <162533196+Kode-Z@users.noreply.github.com> Date: Sat, 31 May 2025 04:32:58 +0100 Subject: [PATCH] New custom touch controls. (#727) * Add files via upload * Add files via upload * Update 1278031123.json * Update south-of-midnight.json Added segmented pull buttons to enhance combat/traversal gameplay! * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update south-of-midnight.json * Update south-of-midnight.json * south-of-midnight: minor adjustments - Change segmented button's opacity from 0.3 to 0.5 - Add "exclusive" type for d-pad --------- Co-authored-by: redphx <96280+redphx@users.noreply.github.com> --- touch-layouts/1714795112.json | 7 + touch-layouts/654479291.json | 7 + .../layouts/conker-live-and-reloaded.json | 146 ++++++++++++++++ touch-layouts/layouts/doom-doom-ii.json | 158 ++++++++++++++++++ touch-layouts/layouts/south-of-midnight.json | 149 ++++++++++++++--- 5 files changed, 444 insertions(+), 23 deletions(-) create mode 100644 touch-layouts/1714795112.json create mode 100644 touch-layouts/654479291.json create mode 100644 touch-layouts/layouts/conker-live-and-reloaded.json create mode 100644 touch-layouts/layouts/doom-doom-ii.json diff --git a/touch-layouts/1714795112.json b/touch-layouts/1714795112.json new file mode 100644 index 0000000..9fbabf0 --- /dev/null +++ b/touch-layouts/1714795112.json @@ -0,0 +1,7 @@ +{ + "name": "DOOM + DOOM II", + "default_layout": "custom", + "layouts": [ + "doom-doom-ii" + ] +} \ No newline at end of file diff --git a/touch-layouts/654479291.json b/touch-layouts/654479291.json new file mode 100644 index 0000000..308df71 --- /dev/null +++ b/touch-layouts/654479291.json @@ -0,0 +1,7 @@ +{ + "name": "Conker Live and Reloaded", + "default_layout": "custom", + "layouts": [ + "conker-live-and-reloaded" + ] +} \ No newline at end of file diff --git a/touch-layouts/layouts/conker-live-and-reloaded.json b/touch-layouts/layouts/conker-live-and-reloaded.json new file mode 100644 index 0000000..1ed50e6 --- /dev/null +++ b/touch-layouts/layouts/conker-live-and-reloaded.json @@ -0,0 +1,146 @@ +{ + "schema_version": 1, + "layouts": { + "custom": { + "name": "Custom", + "author": "Kode-Z", + "content": { + "left": { + "inner": [ + { + "type": "joystick", + "expand": false, + "axis": { + "input": "axisXY", + "output": "leftJoystick" + } + } + ], + "outer": [ + null + ] + }, + "right": { + "inner": [ + { + "type": "joystick", + "axis": { + "input": "axisXY", + "output": "rightJoystick" + } + } + ], + "outer": [ + null, + null, + [ + { + "type": "joystick", + "axis": { + "input": "axisXY", + "output": "rightJoystick", + "deadzone": { + "threshold": 0.05, + "radial": true + } + }, + "action": "leftTrigger", + "styles": { + "default": { + "outline": { + "indicator": { + "type": "color", + "value": "#ffffff" + }, + "stroke": { + "type": "solid", + "color": "#ffffff" + }, + "opacity": 0.1 + }, + "knob": { + "faceImage": { + "type": "icon", + "value": "leftTrigger" + } + } + } + } + } + ], + { + "type": "button", + "action": "gamepadA", + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "jump" + } + } + } + }, + { + "type": "button", + "action": "rightTrigger", + "pullAction": { + "type": "segmented", + "items": [ + "gamepadA" + ] + }, + "styles": { + "default": { + "pullIndicator": [ + { + "faceImage": { + "type": "icon", + "value": "jump" + } + } + ] + }, + "idle": { + "pullIndicator": [ + null, + { + "opacity": 0.5 + } + ] + } + } + }, + { + "type": "button", + "action": "gamepadB", + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "weaponSelect" + } + } + } + } + ] + }, + "upper": { + "right": [ + { + "type": "button", + "action": "menu" + }, + { + "type": "button", + "action": "gamepadY" + }, + { + "type": "button", + "action": "gamepadX" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/touch-layouts/layouts/doom-doom-ii.json b/touch-layouts/layouts/doom-doom-ii.json new file mode 100644 index 0000000..d514b80 --- /dev/null +++ b/touch-layouts/layouts/doom-doom-ii.json @@ -0,0 +1,158 @@ +{ + "schema_version": 1, + "layouts": { + "custom": { + "name": "custom", + "author": "Kode-Z", + "content": { + "left": { + "inner": [ + { + "type": "joystick", + "expand": true, + "axis": { + "input": "axisXY", + "output": "leftJoystick", + "deadzone": { + "threshold": 0.05, + "radial": true + } + } + } + ], + "outer": [ + { + "type": "button", + "action": "rightBumper" + }, + null, + [ + { + "type": "directionalPad", + "interaction": { + "activationType": "exclusive" + }, + "scale": 1.2 + } + ], + null, + null, + null, + { + "type": "button", + "action": "leftBumper" + } + ] + }, + "right": { + "inner": [ + { + "type": "touchpad", + "axis": { + "input": "axisXY", + "output": "rightJoystick", + "sensitivity": 2.5 + }, + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "aim" + } + } + } + } + ], + "outer": [ + null, + null, + { + "type": "button", + "action": "leftTrigger", + "toggle": true, + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "walk" + } + } + } + }, + null, + { + "type": "button", + "action": "gamepadA", + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "interact" + } + } + } + }, + [ + { + "type": "touchpad", + "axis": { + "input": "axisXY", + "output": "rightJoystick", + "sensitivity": 2.5 + }, + "action": "rightTrigger", + "renderAsButton": true, + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "fire" + } + } + } + } + ] + ] + }, + "upper": { + "right": [ + { + "type": "button", + "action": "menu" + }, + { + "type": "button", + "action": "gamepadY", + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "map" + } + } + } + }, + { + "type": "button", + "action": "gamepadB" + }, + { + "type": "button", + "action": "gamepadX" + } + ] + }, + "sensors": [ + { + "type": "gyroscope", + "axis": { + "input": "axisXY", + "output": "rightJoystick", + "sensitivity": 1 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/touch-layouts/layouts/south-of-midnight.json b/touch-layouts/layouts/south-of-midnight.json index 135e887..3e6963d 100644 --- a/touch-layouts/layouts/south-of-midnight.json +++ b/touch-layouts/layouts/south-of-midnight.json @@ -41,7 +41,10 @@ null, [ { - "type": "directionalPad" + "type": "directionalPad", + "interaction": { + "activationType": "exclusive" + } } ], null, @@ -70,35 +73,94 @@ "type": "button", "action": "rightTrigger" }, + { + "type": "button", + "action": "gamepadB", + "pullAction": { + "type": "segmented", + "items": [ + "gamepadX" + ] + }, + "styles": { + "default": { + "pullIndicator": [ + { + "opacity": 0.5 + }, + { + "faceImage": { + "type": "icon", + "value": "lightPunch3" + } + } + ] + }, + "idle": { + "pullIndicator": [ + { + "opacity": 0.0 + } + ] + } + } + }, + { + "type": "button", + "action": "gamepadX", + "styles": { + "default": { + "faceImage": { + "type": "icon", + "value": "lightPunch3" + } + } + } + }, [ - { - "type": "button", - "action": "gamepadB" - }, - null, { "type": "button", "action": "gamepadA", + "pullAction": { + "type": "segmented", + "items": [ + "gamepadX", + "gamepadB" + ] + }, "styles": { "default": { "faceImage": { "type": "icon", "value": "jump" - } - } - } - } - ], - [ - { - "type": "button", - "action": "gamepadX", - "styles": { - "default": { - "faceImage": { - "type": "icon", - "value": "lightPunch3" - } + }, + "pullIndicator": [ + { + "opacity": 0.5 + }, + { + "opacity": 0.5 + }, + { + "faceImage": { + "type": "icon", + "value": "lightPunch3" + } + }, + { + "faceImage": { + "type": "icon", + "value": "gamepadB" + } + } + ] + }, + "idle": { + "pullIndicator": [ + { + "opacity": 0.0 + } + ] } } }, @@ -121,7 +183,48 @@ ], { "type": "button", - "action": "leftTrigger" + "action": "leftTrigger", + "pullAction": { + "type": "segmented", + "items": [ + "gamepadX", + "rightTrigger" + ] + }, + "styles": { + "default": { + "pullIndicator": [ + { + "opacity": 0.5 + }, + { + "opacity": 0.5 + }, + { + "faceImage": { + "type": "icon", + "value": "lightPunch3" + } + }, + { + "faceImage": { + "type": "icon", + "value": "rightTrigger" + } + } + ] + }, + "idle": { + "pullIndicator": [ + { + "opacity": 0.0 + }, + { + "opacity": 0.0 + } + ] + } + } }, { "type": "button", @@ -144,4 +247,4 @@ } } } -} \ No newline at end of file +}