This commit is contained in:
Kyle
2019-08-10 15:20:24 -07:00
parent cf2c840133
commit 88a8c4e87e
2 changed files with 19 additions and 4 deletions

View File

@@ -213,4 +213,13 @@ function updateColorSelector() {
}
function updateBackgroundColor(color) {
playerList[parseInt(document.getElementById("inputPlayer").value) - 1].canvas.customVarColor = color
}
}
//Wake lock!
var noSleep = new NoSleep();
function enableNoSleep() {
noSleep.enable();
document.removeEventListener('touchstart', enableNoSleep, false);
}
document.addEventListener('touchstart', enableNoSleep, false);

View File

@@ -48,7 +48,7 @@
</script>
</head>
<script src="https://github.com/richtr/NoSleep.js/blob/master/dist/NoSleep.min.js"></script>
<body>
<div id="settings" class="settings">
@@ -69,7 +69,7 @@
<div class="menuOption">
Change Background Color:<br>
<select id="inputPlayer" onchange="updateColorSelector()"></select><br>
<input type=color value="#222222" id="inputPlayerColor" onchange="updateBackgroundColor(this.value)"><br>
<input type="color" class="colorInput" value="#222222" id="inputPlayerColor" onchange="updateBackgroundColor(this.value)"><br>
<button onclick="updateBackgroundColor('#222222')">Default</button>
</div><br>
</div>
@@ -196,7 +196,7 @@
margin: 90pt 0px 0px 0px;
padding: 20pt;
overflow-y: scroll;
max-height: calc(100% - 180pt);
max-height: calc(100% - 90pt);
border: 1px solid white;
}
.menuOption {
@@ -207,6 +207,12 @@
margin-bottom: 15pt;
padding: 8pt;
}
.colorInput {
border: 0px;
padding: 0px;
width: 4.5em;
height: 2em;
}
.hidden {
display: none;
}