-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (53 loc) · 1.87 KB
/
index.html
File metadata and controls
55 lines (53 loc) · 1.87 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<style type="text/css">
textarea {
min-width: 300px;
min-height: 100px;
background-color: black;
font-size: 1em;
font-weight: bold;
font-family: monospace;
color: green;
border: 1px solid black;
}
</style>
</head>
<body>
<script src="build/project.bundle.js" charset="utf-8"></script>
<div id="dialog" title="Controls Dialog">
<center>
<label>Code:</label><br/>
<textarea id="code" rows="10" cols="25"></textarea><br/>
<input type="hidden" id="delay" value="2000"/>
<button onclick="startSimulate()">Start Simulation</button><br/>
<div id="message"></div>
</center>
</div>
<script src="robo.js">
</script>
<script>
function startSimulate() {
var code = document.getElementById("code").value;
delay = document.getElementById("delay").value;
code = code.replace(/[' '\r\n]+/g, '');
reloadProgram(code);
resetMachine();
setTimeout(start,1000);
}
function showDialog() {
$( "#dialog" ).dialog();
}
$( "#dialog" ).dialog();
</script>
<button onclick="showDialog()">Show Controls</button>
<br/>
<br/>
</body>
</html>