Add team name box (hidden)
This commit is contained in:
parent
651eeac2d2
commit
c404968c6c
|
@ -61,6 +61,10 @@ input[readonly] {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -27,27 +27,29 @@
|
|||
<body>
|
||||
<div id="scoreboard">
|
||||
<div class="team" id="team-a">
|
||||
<span class="jammer" id="jammer-a">★</span>
|
||||
<input class="name" id="name-a" value="HOME">
|
||||
<div class="logo" id="logo-a">
|
||||
<img class="img" id="img-a" src="" alt="A">
|
||||
<canvas class="kitty" id="kitty-a"></canvas>
|
||||
<input type="color" class="setup color" id="color-a" value="#666666">
|
||||
<input type="image" class="setup load" id="load-a" src="ic_picture.png">
|
||||
</div>
|
||||
<span class="timeouts" id="timeouts-a">3</span>
|
||||
<span class="jammer" id="jammer-a">★</span>
|
||||
<span class="score" id="score-a">-</span>
|
||||
<span class="timeouts" id="timeouts-a">3</span>
|
||||
</div>
|
||||
|
||||
<div class="team" id="team-b">
|
||||
<span class="jammer" id="jammer-b">★</span>
|
||||
<input class="name" id="name-b" value="HOME">
|
||||
<div class="logo" id="logo-b">
|
||||
<img class="img" id="img-b" src="" alt="B">
|
||||
<canvas class="kitty" id="kitty-b"></canvas>
|
||||
<input type="color" class="setup color" id="color-b" value="#ffffff">
|
||||
<input type="image" class="setup load" id="load-b" src="ic_picture.png">
|
||||
</div>
|
||||
<span class="timeouts" id="timeouts-b">3</span>
|
||||
<span class="jammer" id="jammer-b">★</span>
|
||||
<span class="score" id="score-b">-</span>
|
||||
<span class="timeouts" id="timeouts-b">3</span>
|
||||
</div>
|
||||
|
||||
<div class="clocks">
|
||||
|
|
|
@ -602,8 +602,8 @@ function start() {
|
|||
ei("close");
|
||||
ei("preset");
|
||||
|
||||
e("color-a").addEventListener("change", function() {rekitty("a")}, false);
|
||||
e("color-b").addEventListener("change", function() {rekitty("b")}, false);
|
||||
e("color-a").addEventListener("change", function() {recolor("a")}, false);
|
||||
e("color-b").addEventListener("change", function() {recolor("b")}, false);
|
||||
|
||||
ei("periodtext").innerHTML = periodtext[period];
|
||||
ei("jamtext").innerHTML = jamtext[3];
|
||||
|
@ -622,13 +622,15 @@ function start() {
|
|||
|
||||
}
|
||||
|
||||
function rekitty(team) {
|
||||
function recolor(team) {
|
||||
var i = e("img-" + team)
|
||||
var k = e("kitty-" + team)
|
||||
var n = e("name-" + team)
|
||||
var color = e("color-" + team).value
|
||||
|
||||
i.style.display = "none"
|
||||
k.style.display = "inline"
|
||||
n.style.backgroundColor = color
|
||||
kitty(k.getContext("2d"), color)
|
||||
}
|
||||
|
||||
|
@ -649,8 +651,8 @@ function resize() {
|
|||
k.width = kw
|
||||
k.height = kh
|
||||
}
|
||||
rekitty("a")
|
||||
rekitty("b")
|
||||
recolor("a")
|
||||
recolor("b")
|
||||
}
|
||||
|
||||
window.onload = start;
|
||||
|
|
Loading…
Reference in New Issue