-
Notifications
You must be signed in to change notification settings - Fork 105
/
index.html
63 lines (53 loc) · 1.57 KB
/
index.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
Gamepad API Test
Written in 2013 by Ted Mielczarek <[email protected]>
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<script type="text/javascript" src="gamepadtest.js"></script>
<style>
.axes {
padding: 1em;
}
.buttons {
margin-left: 1em;
}
/*meter*/.axis {
min-width: 200px;
margin: 1em;
}
.button {
display: inline-block;
width: 1em;
text-align: center;
padding: 1em;
border-radius: 20px;
border: 1px solid black;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAAxJREFUCNdjYPjPAAACAgEAqiqeJwAAAABJRU5ErkJggg==);
background-size: 0% 0%;
background-position: 50% 50%;
background-repeat: no-repeat;
}
.pressed {
border: 1px solid red;
}
.touched::after {
content: "touch";
display: block;
position: absolute;
margin-top: -0.2em;
margin-left: -0.5em;
font-size: 0.8em;
opacity: 0.7;
}
</style>
</head>
<body>
<h2 id="start">Press a button on your controller to start</h2>
<a href="https://github.com/luser/gamepadtest"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
</body>
</html>