fixing more groups
This commit is contained in:
parent
84b98a2788
commit
7c2ea7c406
@ -116,6 +116,7 @@
|
|||||||
"{id:category}Sensors": "Sensors",
|
"{id:category}Sensors": "Sensors",
|
||||||
"{id:category}Serial": "Serial",
|
"{id:category}Serial": "Serial",
|
||||||
"{id:group}Brick": "Brick",
|
"{id:group}Brick": "Brick",
|
||||||
|
"{id:group}Buttons": "Buttons",
|
||||||
"{id:group}Color Sensor": "Color Sensor",
|
"{id:group}Color Sensor": "Color Sensor",
|
||||||
"{id:group}Gyro Sensor": "Gyro Sensor",
|
"{id:group}Gyro Sensor": "Gyro Sensor",
|
||||||
"{id:group}Infrared Sensor": "Infrared Sensor",
|
"{id:group}Infrared Sensor": "Infrared Sensor",
|
||||||
|
@ -89,7 +89,7 @@ namespace brick {
|
|||||||
//% parts="brick"
|
//% parts="brick"
|
||||||
//% blockNamespace=brick
|
//% blockNamespace=brick
|
||||||
//% weight=81 blockGap=8
|
//% weight=81 blockGap=8
|
||||||
//% group="Brick"
|
//% group="Buttons"
|
||||||
isPressed() {
|
isPressed() {
|
||||||
return this._isPressed
|
return this._isPressed
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ namespace brick {
|
|||||||
//% parts="brick"
|
//% parts="brick"
|
||||||
//% blockNamespace=brick
|
//% blockNamespace=brick
|
||||||
//% weight=80 blockGap=8
|
//% weight=80 blockGap=8
|
||||||
//% group="Brick"
|
//% group="Buttons"
|
||||||
wasPressed() {
|
wasPressed() {
|
||||||
const r = this._wasPressed
|
const r = this._wasPressed
|
||||||
this._wasPressed = false
|
this._wasPressed = false
|
||||||
@ -122,7 +122,7 @@ namespace brick {
|
|||||||
//% parts="brick"
|
//% parts="brick"
|
||||||
//% blockNamespace=brick
|
//% blockNamespace=brick
|
||||||
//% weight=99 blockGap=8
|
//% weight=99 blockGap=8
|
||||||
//% group="Brick"
|
//% group="Buttons"
|
||||||
onEvent(ev: ButtonEvent, body: () => void) {
|
onEvent(ev: ButtonEvent, body: () => void) {
|
||||||
control.onEvent(this._id, ev, body)
|
control.onEvent(this._id, ev, body)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user