Add green flag and stop button to playground

This commit is contained in:
Tim Mickel committed 2016-06-01 14:17:18 -04:00
1 parent 1ab391281d
commit bbc66a95a7
3 files changed
+13 -2

No files matched your search

+4 -1
View File
@@ -9,8 +9,11 @@
</head>
<body>
<div id="vm-devtools">
<h2>Scratch VM Playground</h2>
<button id="greenflag">Green flag</button>
<button id="stopall">Stop</button>
<div id="tab-blockexplorer">
<h2>VM Block Representation</h2>
<h3>VM Block Representation</h3>
<pre id="blockexplorer"></pre>
</div>
</div>
+1 -1
View File
@@ -20,7 +20,7 @@ body {
#blockexplorer {
position: absolute;
width: 100%;
height: 80%;
height: 75%;
overflow: scroll;
border: 1px solid #fff;
background: rgb(36,36,36);
+8
View File
@@ -23,4 +23,12 @@ window.onload = function() {
// Run threads
vm.runtime.start();
// Handlers for green flag and stop all.
document.getElementById('greenflag').addEventListener('click', function() {
vm.runtime.greenFlag();
});
document.getElementById('stopall').addEventListener('click', function() {
vm.runtime.stopAll();
});
};