Skip to content

Commit

Permalink
gamesync: Actually implement the color code inputs (oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Jul 24, 2023
1 parent cb49376 commit dfd2f9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion httpstatic/gamesync.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const games = {
["99", "100", "101", "102", "103", "104", "105", BR(),
"150", "151", "152", "153", "154", "155"]))]),
TR([TD("Code"), TD([
//Red, Green, Blue
INPUT({"data-setting": "code-red", style: "background-color: red; color: white", type: "number", value: data["code-red"]}),
INPUT({"data-setting": "code-green", style: "background-color: green; color: white", type: "number", value: data["code-green"]}),
INPUT({"data-setting": "code-blue", style: "background-color: blue; color: white", type: "number", value: data["code-blue"]}),
])]),
TR([TD("Recep PC"), TD(BUTTONBOX(data, "recep", {style: "background-color: black; color: white"},
["Left", "Center", "Right"]))]),
Expand Down Expand Up @@ -148,3 +150,4 @@ on("click", "button[data-setting]", e => {
ws_sync.send({cmd: "update_data", key, val});
});
on("change", "select[data-setting]", e => ws_sync.send({cmd: "update_data", key: e.match.dataset.setting, val: e.match.value}));
on("input", "input[data-setting]", e => ws_sync.send({cmd: "update_data", key: e.match.dataset.setting, val: e.match.value}));

0 comments on commit dfd2f9b

Please sign in to comment.