File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ export const category =
2+ {
3+ kind : 'category' ,
4+ name : 'Components' ,
5+ contents : [
6+ {
7+ kind : 'category' ,
8+ name : 'Touch Sensor' ,
9+ contents : [
10+ {
11+ kind : "block" ,
12+ type : "mrc_call_python_function" ,
13+ extraState : { "functionKind" : "instance" ,
14+ "MODULE_OR_CLASS" : "touch" ,
15+ "returnType" : "bool" ,
16+ "args" : [ ] ,
17+ "tooltip" : "Returns if the touch sensor is pressed or not" ,
18+ } ,
19+ fields : {
20+ FUNC : 'is_pressed' ,
21+ } ,
22+ }
23+ ]
24+ } ,
25+ {
26+ kind : 'category' ,
27+ name : 'Smart Motor' ,
28+ contents : [ ]
29+ } ,
30+ {
31+ kind : 'category' ,
32+ name : 'Servo' ,
33+ contents : [ ]
34+ } ,
35+ {
36+ kind : 'category' ,
37+ name : 'Color Range Sensor' ,
38+ contents : [ ]
39+ }
40+ ] ,
41+ }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {category as textCategory} from './text_category';
2828import { category as listsCategory } from './lists_category' ;
2929import { category as miscCategory } from './misc_category' ;
3030import { category as methodsCategory } from './methods_category' ;
31+ import { category as componentSampleCategory } from './component_samples_category' ;
3132
3233export function getToolboxJSON (
3334 opt_includeExportedBlocksFromProject : toolboxItems . ContentsType [ ] ,
@@ -72,6 +73,7 @@ export function getToolboxJSON(
7273 custom : 'VARIABLE' ,
7374 } ,
7475 methodsCategory ,
76+ componentSampleCategory ,
7577 ] ) ;
7678
7779 return {
You can’t perform that action at this time.
0 commit comments