Skip to content
This repository was archived by the owner on Jun 10, 2023. It is now read-only.

Commit a4be018

Browse files
committed
Removed application menu and added green flag to start and icons for deploy
1 parent b2b0982 commit a4be018

File tree

9 files changed

+2722
-17
lines changed

9 files changed

+2722
-17
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mbot-scratch-blocks
22

3-
**mBot Scratch Blocks Alpha**
3+
**mBot Scratch Blocks Alpha 2**
44

55
Very first alpha version of a [Scratch Blocks](https://github.com/LLK/scratch-blocks) editor to program the [mBot](http://learn.makeblock.com/mbot/) STEM Robotic Kit.
66

@@ -11,6 +11,25 @@ Very first alpha version of a [Scratch Blocks](https://github.com/LLK/scratch-bl
1111

1212
You'll need [Node.js](https://nodejs.org/en/download/) (which comes with [npm](http://npmjs.com)) installed on your computer.
1313

14+
## Prepare your environment on GNU/Linux (Ubuntu)
15+
16+
```bash
17+
sudo apt-get install build-essential
18+
sudo apt-get install gcc-4.8 g++-4.8 && export CXX=g++-4.8
19+
sudo apt-get install libusb-1.0-0-dev libudev-dev
20+
```
21+
Create create /etc/udev/rules.d/99-hidraw-permissions.rules with following line
22+
23+
```bash
24+
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE=="777", GROUP="plugdev"create
25+
```
26+
And restart udev:
27+
28+
```bash
29+
udevadm control --reload-rules
30+
```
31+
## For development
32+
1433
Then from your command line:
1534

1635
```bash

build/icons/128x128.png

5.03 KB
Loading

build/icons/256x256.png

10.9 KB
Loading

build/icons/64x64.png

2.59 KB
Loading

icon.ico

361 KB
Binary file not shown.

index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,26 @@
1212
<script src="blocks_horizontal/mbot.js"></script>
1313

1414
<script src="mbot_toolbox.js"></script>
15-
15+
<style media="screen">
16+
#runBox {
17+
position: absolute;
18+
top: 30px;
19+
right: 30px;
20+
z-index: 9;
21+
width: 50px;
22+
height: 50px;
23+
background-color: white;
24+
border-radius: 20px;
25+
padding: 5px;
26+
cursor: hand;
27+
}
28+
</style>
1629

1730
</head>
1831

1932
<body>
2033
<div id="blocklyDiv"></div>
34+
<div id="runBox" onclick="runCode()"><img src="media/icons/event_whenflagclicked.svg"></div>
2135
</body>
2236

2337
<script src="hid_mbot.js"></script>

main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ function createWindow () {
3131
const MenuItem = electron.MenuItem;
3232

3333
const menu = new Menu()
34-
menu.append(new MenuItem({label: 'RUN', click() { mainWindow.webContents.send('runCode'); }}));
34+
//menu.append(new MenuItem({label: 'RUN', click() { mainWindow.webContents.send('runCode'); }}));
3535

36-
menu.append(new MenuItem({label: 'DEBUG', click() { mainWindow.webContents.toggleDevTools(); }}))
37-
Menu.setApplicationMenu(menu)
36+
//menu.append(new MenuItem({label: 'DEBUG', click() { mainWindow.webContents.toggleDevTools(); }}))
37+
Menu.setApplicationMenu(null)
3838

3939
// Emitted when the window is closed.
4040
mainWindow.on('closed', function () {

0 commit comments

Comments
 (0)