Add timeout tridents

This commit is contained in:
Neale Pickett 2014-02-15 22:21:36 -07:00
parent 96fc6b15f9
commit 38fcef784b
3 changed files with 23 additions and 9 deletions

View File

@ -24,6 +24,10 @@ body {
cursor: default; cursor: default;
} }
#scoreboard * {
-webkit-user-select: none;
}
input { input {
border: 0px; border: 0px;
@ -97,14 +101,12 @@ input {
.timeouts { .timeouts {
<<<<<<< HEAD
margin-top: 4.8em;
font-size: 20%;
=======
position: absolute; position: absolute;
width: 1.8em; right: 1em;
bottom: 0.1em; top: 0.92em;
>>>>>>> master width: 3em;
height: 0.1em;
z-index: 12;
} }

View File

@ -34,7 +34,7 @@
<input type="image" class="setup load" id="load-a" src="ic_picture.png"> <input type="image" class="setup load" id="load-a" src="ic_picture.png">
</div> </div>
<span class="score" id="score-a">-</span> <span class="score" id="score-a">-</span>
<canvas class="timeouts" id="timeouts-a" height="20" width="300" data-gravity="west"> <canvas class="timeouts" id="timeouts-a" height="20" width="300">
</div> </div>
<div class="team" id="team-b"> <div class="team" id="team-b">
@ -45,7 +45,7 @@
<input type="image" class="setup load" id="load-b" src="ic_picture.png"> <input type="image" class="setup load" id="load-b" src="ic_picture.png">
</div> </div>
<span class="score" id="score-b">-</span> <span class="score" id="score-b">-</span>
<canvas class="timeouts" id="timeouts-b" height="20" width="300" data-gravity="east"> <canvas class="timeouts" id="timeouts-b" height="20" width="300">
</div> </div>
<div class="clocks"> <div class="clocks">

View File

@ -287,6 +287,10 @@ function transition(newstate) {
e("jammer-a").className = "jammer"; e("jammer-a").className = "jammer";
e("jammer-b").className = "jammer"; e("jammer-b").className = "jammer";
// Make team names read-only
e("name-a").readOnly = true
e("name-b").readOnly = true
var setupElements = document.getElementsByClassName("setup") var setupElements = document.getElementsByClassName("setup")
for (var i = 0; i < setupElements.length; i += 1) { for (var i = 0; i < setupElements.length; i += 1) {
var el = setupElements[i] var el = setupElements[i]
@ -389,6 +393,12 @@ function handle(event) {
case "load-b": case "load-b":
changeLogo(team) changeLogo(team)
break break
case "name-a":
case "name-b":
if (tgt.readOnly) {
score(team, -adj);
}
break;
case "img-a": case "img-a":
case "img-b": case "img-b":
case "kitty-a": case "kitty-a":
@ -642,6 +652,8 @@ function start() {
resize(); resize();
load(); load();
ei("name-a")
ei("name-b")
ei("logo-a"); ei("logo-a");
ei("logo-b"); ei("logo-b");
ei("score-a"); ei("score-a");