MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / registerColourPickers

Function registerColourPickers

source/hand.js:109–116  ·  view source on GitHub ↗
(hand, hexes, colours)

Source from the content-addressed store, hash-verified

107// KEYBOARD //
108//==========//
109export const registerColourPickers = (hand, hexes, colours) => {
110 for (let i = 0; i < hexes.length; i++) {
111 const hex = hexes[i];
112 onkeydown(`${i + 1}`, () => (hand.colour = colours[hex]));
113 }
114
115 onkeydown("q", () => (hand.hidden = !hand.hidden));
116};
117
118//========//
119// STATES //

Callers 1

main.jsFile · 0.90

Calls 1

onkeydownFunction · 0.90

Tested by

no test coverage detected