From b379f1d82c12aa9946c701736905e2b52e6f2b7a Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 25 Mar 2023 00:43:51 -0600 Subject: [PATCH] sample cfg file --- src/device/input/button/testdata/v01.yaml | 16 ++++++++++++++++ src/device/input/button/v01.go | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/device/input/button/testdata/v01.yaml diff --git a/src/device/input/button/testdata/v01.yaml b/src/device/input/button/testdata/v01.yaml new file mode 100644 index 0000000..9da3858 --- /dev/null +++ b/src/device/input/button/testdata/v01.yaml @@ -0,0 +1,16 @@ +users: + bel: + player: 0 + message: "hi" +players: +- buttons: + up: "w" + down: "s" + left: "a" + right: "d" + l: "q" + r: "e" + a: "1" + b: "2" + x: "3" + y: "4" diff --git a/src/device/input/button/v01.go b/src/device/input/button/v01.go index 1483ba6..dcd0f1e 100644 --- a/src/device/input/button/v01.go +++ b/src/device/input/button/v01.go @@ -25,6 +25,24 @@ type ( N string } v01Cfg struct { + Users map[string]struct { + Player int + Message string + } + Players []struct { + Buttons struct { + Up string + Down string + Left string + Right string + L string + R string + A string + B string + X string + Y string + } + } } )