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;
}
#scoreboard * {
-webkit-user-select: none;
}
input {
border: 0px;
@ -97,14 +101,12 @@ input {
.timeouts {
<<<<<<< HEAD
margin-top: 4.8em;
font-size: 20%;
=======
position: absolute;
width: 1.8em;
bottom: 0.1em;
>>>>>>> master
right: 1em;
top: 0.92em;
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">
</div>
<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 class="team" id="team-b">
@ -45,7 +45,7 @@
<input type="image" class="setup load" id="load-b" src="ic_picture.png">
</div>
<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 class="clocks">

View File

@ -287,6 +287,10 @@ function transition(newstate) {
e("jammer-a").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")
for (var i = 0; i < setupElements.length; i += 1) {
var el = setupElements[i]
@ -389,6 +393,12 @@ function handle(event) {
case "load-b":
changeLogo(team)
break
case "name-a":
case "name-b":
if (tgt.readOnly) {
score(team, -adj);
}
break;
case "img-a":
case "img-b":
case "kitty-a":
@ -642,6 +652,8 @@ function start() {
resize();
load();
ei("name-a")
ei("name-b")
ei("logo-a");
ei("logo-b");
ei("score-a");