diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index fb4badc4..7f842603 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -116,6 +116,7 @@ "{id:category}Sensors": "Sensors", "{id:category}Serial": "Serial", "{id:group}Brick": "Brick", + "{id:group}Buttons": "Buttons", "{id:group}Color Sensor": "Color Sensor", "{id:group}Gyro Sensor": "Gyro Sensor", "{id:group}Infrared Sensor": "Infrared Sensor", diff --git a/libs/core/buttons.ts b/libs/core/buttons.ts index e4791751..b92c3f39 100644 --- a/libs/core/buttons.ts +++ b/libs/core/buttons.ts @@ -89,7 +89,7 @@ namespace brick { //% parts="brick" //% blockNamespace=brick //% weight=81 blockGap=8 - //% group="Brick" + //% group="Buttons" isPressed() { return this._isPressed } @@ -104,7 +104,7 @@ namespace brick { //% parts="brick" //% blockNamespace=brick //% weight=80 blockGap=8 - //% group="Brick" + //% group="Buttons" wasPressed() { const r = this._wasPressed this._wasPressed = false @@ -122,7 +122,7 @@ namespace brick { //% parts="brick" //% blockNamespace=brick //% weight=99 blockGap=8 - //% group="Brick" + //% group="Buttons" onEvent(ev: ButtonEvent, body: () => void) { control.onEvent(this._id, ev, body) }