From dfd2f9b8e1c2e31d75189dd9f63e88bde32902bc Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Mon, 24 Jul 2023 20:41:04 +1000 Subject: [PATCH] gamesync: Actually implement the color code inputs (oops) --- httpstatic/gamesync.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/httpstatic/gamesync.js b/httpstatic/gamesync.js index faf40cce..170b73a9 100644 --- a/httpstatic/gamesync.js +++ b/httpstatic/gamesync.js @@ -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"]))]), @@ -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}));