blob: 525c5de158b30478eda2df2908f79f09edba4a43 (
plain) (
blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="viewport-fit=cover,width=device-width, initial-scale=1, shrink-to-fit=no,initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="HandheldFriendly" content="true" />
<title>MICRO:BIT gamepad</title>
<link rel="canonical" rel="https://jakobst1n.github.io/microbit-gamepad/">
<link rel="stylesheet" type="text/css" href="./scss/styles.scss">
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kufam&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
</head>
<body class="">
<div class="app-info">
<h1>MICRO:BIT gamepad</h1>
<span class="version">{{ VERSION }}</span>
</div>
<button title="Show settings dialog" class="settings-button" id="btn_show_settings">
<i class="fas fa-cog" aria-hidden="true"></i>
</button>
<div class="settings-dialog">
<div class="header">
<h1>Settings</h1>
<button title="Close settings dialog" class="close-settings" id="btn_hide_settings">
<i class="fas fa-times" aria-hidden="true"></i>
</button>
</div>
<div class="content">
<form>
<label class="form-control" for="layout">
Gamepad layout
<select name="layout" id="layout">
<option value="1">DPad + Buttons</option>
<option value="2">DPad + DPad</option>
<option value="9">Joystick + Joystick (not micro:bit compatible)</option>
</select>
</label>
<label class="form-control form-cb" for="show-gamepad-alt-text">
<input type="checkbox" name="show-gamepad-alt-text" id="show-gamepad-alt-text">
Show gamepad keybindings
</label>
<label class="form-control form-cb" for="enable-haptic">
<input type="checkbox" name="enable-haptic" id="enable-haptic">
Enable haptic feedback
</label>
<label class="form-control form-cb" for="show-touches">
<input type="checkbox" name="show-touches" id="show-touches">
Show touches
</label>
<label class="form-control form-cb" for="enable-debug">
<input type="checkbox" name="enable-debug" id="enable-debug">
Show debug data
</label>
</form>
</div>
</div>
<div class="landscape-warning">
<div class="landscape-warning-content">
<i class="fas fa-sync-alt"></i>
<h1>Please use landscape mode</h1>
<button id="btn_ignore_landscape_warning">Ignore</button>
</div>
</div>
<button class="button-center button-center-top" title="Search for bluetooth device" id="btn_connect">CONNECT</button>
<button class="button-center button-center-top" title="Disconnect from connected bluetooth device" id="btn_disconnect">DISCONNECT</button>
<pre class="gamepad-touches" style="margin-left:10px;margin-top:50px;font-size: 8px;"></pre>
<div class="gamepad-wrapper" style="position:absolute;top:0;left:0;"></div>
<div class="button-states"><pre></pre></div>
<div class="statusline">
<span class="statusline-item connection">
<i class="fab fa-bluetooth-b" aria-hidden="true"></i>
</span>
<span class="notification-area"></span>
</div>
<script type="text/javascript" src="./js/main.js"></script>
</body>
</html>
|