Add jam counter for DCD
This commit is contained in:
parent
d3c4e2511e
commit
2e81f2a037
BIN
Mostwasted.ttf
BIN
Mostwasted.ttf
Binary file not shown.
|
@ -4,6 +4,9 @@
|
|||
}
|
||||
#scoreboard {
|
||||
cursor: default;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
#scoreboard td {
|
||||
vertical-align: top;
|
||||
|
@ -17,6 +20,7 @@
|
|||
}
|
||||
.team {
|
||||
font-family: Comunicacion Digital, sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 90%;
|
||||
}
|
||||
.team img {
|
||||
|
@ -46,7 +50,7 @@
|
|||
}
|
||||
|
||||
#jammer-a.lead, #jammer-b.lead {
|
||||
color: yellow;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#jam, #period {
|
||||
|
@ -56,6 +60,11 @@
|
|||
padding: 0 0.1em;
|
||||
}
|
||||
|
||||
#jamno {
|
||||
float: right;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
/* States timers can be in */
|
||||
#jam.paused, #period.paused {
|
||||
color: #888;
|
||||
|
|
|
@ -21,21 +21,22 @@
|
|||
<title>LADD Scoreboard</title>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: Most Wazted;
|
||||
src: url(Mostwasted.ttf);
|
||||
}
|
||||
body {
|
||||
background: url(bg.jpg) #222;
|
||||
background-size: 100% auto;
|
||||
color: #eee;
|
||||
font-family: Most Wazted, fantasy;
|
||||
font-family: sans;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
#scoreboard {
|
||||
font-size: 5em;
|
||||
width: 100%;
|
||||
}
|
||||
#periodtext {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
#notice div {
|
||||
font-family: Crack Babies, Comunicacion Digital, sans-serif;
|
||||
font-size: 7em;
|
||||
|
@ -91,6 +92,7 @@ window.onkeypress = key;
|
|||
<span id="jammer-a" onclick="handle(event);">★</span>
|
||||
<span id="jamtext">-</span>
|
||||
<span id="jammer-b" onclick="handle(event);">★</span>
|
||||
<span id="jamno" onclick="handle(event);">0</span>
|
||||
</p>
|
||||
<p>
|
||||
<span id="jam" onclick="handle(event);">-:--.-</span>
|
||||
|
|
|
@ -34,6 +34,7 @@ var TIMEOUT = 3; // !P J 1:00
|
|||
var periodtext = ["Period 1", "Halftime", "Period 2", "Break"];
|
||||
var jamtext = ["Jam", "Lineup", "Timeout", "Setup"];
|
||||
var period = 0;
|
||||
var jamno = 0;
|
||||
|
||||
var state = SETUP;
|
||||
|
||||
|
@ -142,6 +143,7 @@ function transition(newstate) {
|
|||
var jt = e("jam");
|
||||
var pt = e("period");
|
||||
var jtext = e("jamtext");
|
||||
var jno = e("jamno");
|
||||
|
||||
if ((newstate == undefined) || (newstate == state)) {
|
||||
return;
|
||||
|
@ -158,6 +160,8 @@ function transition(newstate) {
|
|||
jt.set(120000);
|
||||
jt.start();
|
||||
jtext.innerHTML = jamtext[0];
|
||||
jamno += 1;
|
||||
jno.innerHTML = jamno;
|
||||
} else if (state == LINEUP) {
|
||||
pt.start();
|
||||
jt.set(30000, "lineup");
|
||||
|
@ -343,6 +347,10 @@ function handle(event) {
|
|||
newstate = JAM;
|
||||
}
|
||||
break;
|
||||
case "jamno":
|
||||
jamno -= adj;
|
||||
tgt.innerHTML = jamno;
|
||||
break;
|
||||
case "score-a":
|
||||
case "score-b":
|
||||
if (state == SETUP) {
|
||||
|
|
Loading…
Reference in New Issue