diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-08-09 11:14:14 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-08-09 11:14:14 +0200 |
| commit | 08939fb0a1e58a57118d28bb3f949fe4821c09d7 (patch) | |
| tree | c5f859688e7da2c408cf540b96b7a6a80c786bc4 /stdlib/button.lua | |
| parent | d06d50075b536cecb04ceaf6453980e398d68cb8 (diff) | |
| download | bidi-08939fb0a1e58a57118d28bb3f949fe4821c09d7.tar.gz | |
Added support for multiple controllers (Keyboard, Xbox)
Diffstat (limited to 'stdlib/button.lua')
| -rw-r--r-- | stdlib/button.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/button.lua b/stdlib/button.lua index e8b6318..02b8358 100644 --- a/stdlib/button.lua +++ b/stdlib/button.lua @@ -1,16 +1,16 @@ local button = {} -button.PAD_UP = 87 -- Key: W -button.PAD_DOWN = 83 -- Key: S -button.PAD_LEFT = 65 -- Key: A -button.PAD_RIGHT = 68 -- Key: D +button.PAD_UP = { keyboard = 87, xbox = 1, playstation = 0 } -- Key: W +button.PAD_DOWN = { keyboard = 83, xbox = 3, playstation = 0 } -- Key: S +button.PAD_LEFT = { keyboard = 65, xbox = 4, playstation = 0 } -- Key: A +button.PAD_RIGHT = { keyboard = 68, xbox = 2, playstation = 0 } -- Key: D -button.A = 76 -- Key: L -button.B = 80 -- Key: P -button.X = 75 -- Key: K -button.Y = 79 -- Key: O +button.A = { keyboard = 76, xbox = 7, playstation = 0 } -- Key: L +button.B = { keyboard = 80, xbox = 6, playstation = 0 } -- Key: P +button.X = { keyboard = 75, xbox = 8, playstation = 0 } -- Key: K +button.Y = { keyboard = 79, xbox = 5, playstation = 0 } -- Key: O -button.SELECT = 81 -- Key: Q -button.START = 69 -- Key: E +button.SELECT = { keyboard = 81, xbox = 13, playstation = 0 } -- Key: Q +button.START = { keyboard = 69, xbox = 15, playstation = 0 } -- Key: E return button |
