MCPcopy Create free account
hub / github.com/melonjs/melonJS / checkbox

Method checkbox

packages/debug-plugin/src/index.js:159–171  ·  view source on GitHub ↗
(key, label)

Source from the content-addressed store, hash-verified

157
158 // helper to create a checkbox label
159 const checkbox = (key, label) => {
160 const el = document.createElement("label");
161 const cb = document.createElement("input");
162 cb.type = "checkbox";
163 cb.checked = this.options[key];
164 cb.addEventListener("change", () => {
165 this.options[key] = cb.checked;
166 game.repaint();
167 });
168 el.appendChild(cb);
169 el.appendChild(document.createTextNode(label));
170 return el;
171 };
172
173 const toggleKey =
174 Object.keys(input.KEY).find((k) => {

Callers

nothing calls this directly

Calls 1

repaintMethod · 0.80

Tested by

no test coverage detected