Tunable jamtext, mini tweaks

This commit is contained in:
Neale Pickett 2012-04-07 21:41:09 -06:00
parent a6c7bcc200
commit 0d29c7d1ed
2 changed files with 44 additions and 36 deletions

View File

@ -22,15 +22,9 @@
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="scoreboard.css"> <link rel="stylesheet" type="text/css" href="scoreboard.css">
<style type="text/css"> <style type="text/css">
@font-face {
font-family: Most Wazted;
src: url(Mostwasted.ttf);
}
body { body {
background: black; background: black;
background-size: 100% auto; color: white;
color: #eee;
font-family: Most Wazted, fantasy;
text-align: center; text-align: center;
} }
#scoreboard { #scoreboard {
@ -40,24 +34,35 @@
#score-a, #score-b { #score-a, #score-b {
font-size: 150px; font-size: 150px;
position: absolute; position: absolute;
top: 30%; top: 35%;
} }
#score-a { #jammer-a, #jammer-b {
position: absolute;
top: 10px;
}
#jammer-a.lead, #jammer-b.lead {
color: white;
}
#jamtext {
font-family: monospace;
}
#score-a, #jammer-a {
left: 10px; left: 10px;
} }
#score-b { #score-b, #jammer-b {
right: 10px; right: 10px;
} }
html, p { html, p {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
</style> </style>
<script type="text/javascript" src="logos.js"></script> <script type="text/javascript" src="logos.js"></script>
<script type="text/javascript" src="scoreboard.js"></script> <script type="text/javascript" src="scoreboard.js"></script>
<script type="text/javascript"> <script type="text/javascript">
window.onkeypress = key; window.onkeypress = key;
jamtext = ["J", "L", "T", "Setup"];
tenths = true;
</script> </script>
</head> </head>
<body> <body>
@ -67,7 +72,9 @@ window.onkeypress = key;
</p> </p>
<p> <p>
<span id="score-a" onclick="handle(event);">-</span> <span id="score-a" onclick="handle(event);">-</span>
<span id="jammer-a" onclick="handle(event);"></span>
<span id="jamtext">-</span> <span id="jamtext">-</span>
<span id="jammer-b" onclick="handle(event);"></span>
<span id="score-b" onclick="handle(event);">-</span> <span id="score-b" onclick="handle(event);">-</span>
</p> </p>
<p> <p>

View File

@ -32,6 +32,7 @@ var LINEUP = 2; // P J 1:00
var TIMEOUT = 3; // !P J 1:00 var TIMEOUT = 3; // !P J 1:00
var periodtext = ["Period 1", "Halftime", "Period 2", "Break"]; var periodtext = ["Period 1", "Halftime", "Period 2", "Break"];
var jamtext = ["Jam", "Lineup", "Timeout", "Setup"];
var period = 0; var period = 0;
var state = SETUP; var state = SETUP;
@ -156,12 +157,12 @@ function transition(newstate) {
pt.start(); pt.start();
jt.set(120000); jt.set(120000);
jt.start(); jt.start();
jtext.innerHTML = "Jam"; jtext.innerHTML = jamtext[0];
} else if (state == LINEUP) { } else if (state == LINEUP) {
pt.start(); pt.start();
jt.set(30000, "lineup"); jt.set(30000, "lineup");
jt.start(); jt.start();
jtext.innerHTML = "Lineup"; jtext.innerHTML = jamtext[1];
} else if (state == TIMEOUT) { } else if (state == TIMEOUT) {
pt.stop(); pt.stop();
if (pt.remaining() <= 0) { if (pt.remaining() <= 0) {
@ -169,7 +170,7 @@ function transition(newstate) {
} }
jt.set(0, "timeout"); jt.set(0, "timeout");
jt.start(); jt.start();
jtext.innerHTML = "Timeout"; jtext.innerHTML = jamtext[2];
} }
// Reset lead jammer indicators // Reset lead jammer indicators
@ -454,7 +455,7 @@ function start() {
} }
e("periodtext").innerHTML = periodtext[period]; e("periodtext").innerHTML = periodtext[period];
e("jamtext").innerHTML = "Setup"; e("jamtext").innerHTML = jamtext[3];
transition(); transition();
c = Number(ls.rdsb_period_clock || 1800000); c = Number(ls.rdsb_period_clock || 1800000);