about summary refs log tree commit diff stats
path: root/js/gg/game.js
blob: 0ba3d89dca59ac8392e60d7a829017133be2d78a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const buttons = {
  d: {
    up: () => document.getElementById("dUp"),
    down: () => document.getElementById("dDown"),
    right: () => document.getElementById("dRight"),
    left: () => document.getElementById("dLeft"),
  },
  ab: {
    a: () => document.getElementById("a"),
    b: () => document.getElementById("b"),
  },
  aux: {
    start: () => document.getElementById("start"),
    select: () => document.getElementById("select"),
  },
};

console.log(buttons.ab.a);

buttons.ab.a.style.backgroundColor = "pink";