+/obs-gamepad

overlay to display inputs

git clone https://git.julia.blue/+/obs-gamepad

Julia RyanUpdate to edition 2024 and add rounded axes42026f9

main
2.4 KiB66 linesraw
1# All options that accept colors will take any of the following formats:
2# "#RGB", "#RGBA", "#RRGGBB", "#RRGGBBAA"
3
4# These top level options apply to all buttons/sticks/axes unless they're overridden
5inactive = "#123"
6active = "#aaaa"
7# outline = "#282828"
8outline_weight = 1.5
9# stick_radius = 30
10# gate_radius = 50
11
12# Just a radius for button shape means circular buttons, size + radius
13# means rounded rectangle (the radius specifies the corner radius)
14button_shape = { radius = 20 }
15fill_dir = "left_to_right" # for axes
16
17# These button id's are from my switch pro controller, use test.toml
18# to figure out the ID's for your controllers buttons/axes.
19# You can color different parts of the button with: fill, fill_active, outline,
20# and outline_active. outline_weight is also overridable per-button
21buttons = [
22  { id = 2,  pos = [400, 150], fill_active = '#f00' },                     # A
23  { id = 1,  pos = [350, 200], fill_active = '#ff0' },                     # B
24  { id = 3,  pos = [350, 100], fill_active = '#00f' },                     # X
25  { id = 0,  pos = [300, 150], fill_active = '#0f0' },                     # Y
26  { id = 4,  pos = [120, 20],  shape = { size = [80, 40], radius = 10 } }, # LB
27  { id = 5,  pos = [250, 20],  shape = { size = [80, 40], radius = 10 } }, # RB
28  { id = 6,  pos = [20, 20],   shape = { size = [80, 40], radius = 10 } }, # LT
29  { id = 7,  pos = [350, 20],  shape = { size = [80, 40], radius = 10 } }, # RT
30  { id = 9,  pos = [250, 110], shape = { radius = 10 } },                  # +
31  { id = 8,  pos = [200, 110], shape = { radius = 10 } },                  # -
32  { id = 12, pos = [250, 140], shape = { radius = 10 } },                  # home
33  { id = 13, pos = [200, 140], shape = { radius = 10 } },                  # screen shot
34  { id = 10, pos = [173, 210], shape = { radius = 10 } },                  # left stick
35  { id = 11, pos = [233, 210], shape = { radius = 10 } },                  # right stick
36]
37
38[[sticks]] # left
39axes = [0, 1]
40pos = [100, 150]
41gate = "#282828"
42gate_radius = 66
43gate_weight = 3.1
44displacement = 50
45
46[[sticks]] # right
47axes = [2, 3]
48pos = [280, 260]
49radius = 30
50gate = "#282828"
51gate_weight = 2
52gate_radius = 40
53displacement = 30
54
55[[axes]] # dpad x
56id = 4
57pos = [75, 275]
58invert = true
59shape = { size = [80, 10] }
60
61[[axes]] # dpad y
62id = 5
63pos = [110, 240]
64invert = true
65shape = { size = [10, 80] }
66fill_dir = "top_to_bottom"