Skip to content

Commit 5c00a7c

Browse files
committed
Refactored mode configruation and menu bar device buttons.
This changes introduces an better UI experience and only display relevant options depending on the selected mode. It's also introduce the possibility to add mode specific connect handler to the menu bar buttons to simplified the connection. The additional buttons are automatically disabled if the feature is not used or on the select screen to avoid any confusions.
1 parent 1f850fa commit 5c00a7c

File tree

115 files changed

+1687
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1687
-833
lines changed

locales/deu/welcome_screen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Locales['deu']['WELCOME_SCREEN'] = {
2727
'BEGINNER_TEXT': 'Lerne mit visuellen Blöcken zu Programmieren. Erstelle Schritt für Schritt ein Programm mit dem setzten, ziehen und ändern von Blöcken.',
2828
'BEGINNER_ACTION': 'Verwende den Anfänger Modus',
2929
'ADVANCED': 'Fortgeschrittener',
30-
'ADVANCED_TEXT': ' Verwerden Sie eine höhere Programmiersprache wie JavaScript oder Python, um deinen Code zu schreiben.',
30+
'ADVANCED_TEXT': ' Verwenden eine höhere Programmiersprache wie JavaScript oder Python, um deinen Code zu schreiben.',
3131
'ADVANCED_ACTION': 'Verwende den Fortgeschrittener Modus',
3232
'SHOW_ON_STARTUP': 'Start Bildschirm anzeigen',
3333
'SHOW_ON_STARTUP_NOTE': 'Dies kann du jederzeit im “Einstellungsmenü” wieder ändern.',

src/mode/boards/config.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* @fileoverview Editor mode config data for the Coding with Chrome editor.
3+
*
4+
* @license Copyright 2018 The Coding with Chrome Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* @author [email protected] (Markus Bordihn)
19+
*/
20+
goog.provide('cwc.mode.boards.Config');
21+
22+
goog.require('cwc.mode.Mod');
23+
goog.require('cwc.mode.Service');
24+
goog.require('cwc.mode.Type');
25+
goog.require('cwc.mode.raspberryPi.advanced.Mod');
26+
goog.require('cwc.utils.mime.Type');
27+
28+
29+
/**
30+
* enum {Object}
31+
*/
32+
cwc.mode.boards.Config = {};
33+
34+
35+
/**
36+
* Raspberry Pi mode.
37+
* @deprecated Disabled because needs re-implementation and used less than 0.1%.
38+
*/
39+
cwc.mode.boards.Config[cwc.mode.Type.RASPBERRY_PI] = new cwc.mode.Mod({
40+
authors: ['Markus Bordihn'],
41+
icon: 'mode_edit',
42+
mime_types: [cwc.utils.mime.Type.CWC.type],
43+
mod: cwc.mode.raspberryPi.advanced.Mod,
44+
name: 'Raspberry Pi',
45+
template: 'raspberry_pi/blank.cwc',
46+
});

src/mode/games/config.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/**
2+
* @fileoverview Editor mode config data for the Coding with Chrome editor.
3+
*
4+
* @license Copyright 2018 The Coding with Chrome Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* @author [email protected] (Markus Bordihn)
19+
*/
20+
goog.provide('cwc.mode.games.Config');
21+
22+
goog.require('cwc.mode.Mod');
23+
goog.require('cwc.mode.Service');
24+
goog.require('cwc.mode.Type');
25+
goog.require('cwc.mode.phaser.Mod');
26+
goog.require('cwc.utils.mime.Type');
27+
28+
29+
/**
30+
* enum {Object}
31+
*/
32+
cwc.mode.games.Config = {};
33+
34+
35+
/**
36+
* Phaser mode.
37+
*/
38+
cwc.mode.games.Config[cwc.mode.Type.PHASER] = new cwc.mode.Mod({
39+
authors: ['Markus Bordihn'],
40+
auto_preview: true,
41+
icon: 'mode_edit',
42+
mime_types: [cwc.utils.mime.Type.CWC.type],
43+
mod: cwc.mode.phaser.Mod,
44+
name: 'Phaser',
45+
services: [cwc.mode.Service.GAMEPAD],
46+
template: 'phaser/blank.cwc',
47+
});
48+
49+
50+
/**
51+
* Phaser blockly mode.
52+
*/
53+
cwc.mode.games.Config[cwc.mode.Type.PHASER_BLOCKLY] = new cwc.mode.Mod({
54+
authors: ['Markus Bordihn'],
55+
auto_preview: true,
56+
icon: 'mode_edit',
57+
mime_types: [cwc.utils.mime.Type.CWC.type],
58+
mod: cwc.mode.phaser.Mod,
59+
name: 'Phaser blockly',
60+
services: [cwc.mode.Service.GAMEPAD],
61+
show_blockly: true,
62+
template: 'phaser/blank-blocks.cwc',
63+
});
64+

0 commit comments

Comments
 (0)