forked from HanSolo/SteelSeries-Canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demoTrafficLight.html
36 lines (33 loc) · 1.08 KB
/
demoTrafficLight.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>TrafficLight</title>
<script src='steelseries-min.js'></script>
<script>
var trafficLight;
function init()
{
// Initialzing
trafficLight = steelseries.TrafficLight('canvas', {
width: 200,
height: 200
});
}
function setLights() {
trafficLight.setRedOn(document.getElementById('red').checked);
trafficLight.setYellowOn(document.getElementById('yellow').checked);
trafficLight.setGreenOn(document.getElementById('green').checked);
}
</script>
</head>
<body onload='init()' BGCOLOR="333333" TEXT="cccccc">
<canvas id='canvas' width='400' height='400'>
No canvas in your browser...sorry...
</canvas>
<br/>
<input id="red" type="checkbox" onClick="setLights()"/>Red<br />
<input id="yellow" type="checkbox" onClick="setLights()"/>Yellow<br />
<input id="green" type="checkbox" onClick="setLights()"/>Green<br />
</body>
</html>