From d100026d5ce695997d45e005d1986a8127ec56ba Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 16 Nov 2017 13:05:50 -0800 Subject: [PATCH] more icons --- libs/core/_locales/core-strings.json | 18 +++++++++--------- libs/core/output.ts | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index 32f947b0..7af2c0a5 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -47,14 +47,14 @@ "brick|block": "brick", "control.raiseEvent|block": "raise event|from %src|with value %value", "control|block": "control", - "motors.Motor.count|block": "%motor|count", - "motors.Motor.move|block": "move %motor|by %angle|degrees at %power|%", - "motors.Motor.power|block": "power %motor|to %power|%", - "motors.Motor.setBrake|block": "set %motor|brake %brake", - "motors.Motor.setReversed|block": "set %motor|reversed %reversed", - "motors.Motor.speed|block": "%motor|speed", - "motors.Motor.stop|block": "stop %motor", - "motors.Motor.tachoCount|block": "%motor|tacho count", + "motors.Motor.count|block": "`icons.motorLarge` %motor|count", + "motors.Motor.move|block": "move `icons.motorLarge` %motor|by %angle|degrees at %power|%", + "motors.Motor.power|block": "power `icons.motorLarge` %motor|to %power|%", + "motors.Motor.setBrake|block": "set `icons.motorLarge` %motor|brake %brake", + "motors.Motor.setReversed|block": "set `icons.motorLarge` %motor|reversed %reversed", + "motors.Motor.speed|block": "`icons.motorLarge` %motor|speed", + "motors.Motor.stop|block": "stop `icons.motorLarge` %motor", + "motors.Motor.tachoCount|block": "`icons.motorLarge` %motor|tacho count", "motors.largeMotorA|block": "large A", "motors.largeMotorB|block": "large B", "motors.largeMotorC|block": "large C", @@ -63,7 +63,7 @@ "motors.mediumMotorB|block": "medium B", "motors.mediumMotorC|block": "medium C", "motors.mediumMotorD|block": "medium D", - "motors.stopAllMotors|block": "stop all motors", + "motors.stopAllMotors|block": "stop all `icons.motorLarge`", "motors|block": "motors", "output|block": "output", "screen|block": "screen", diff --git a/libs/core/output.ts b/libs/core/output.ts index 4a87e043..aec5ed2c 100644 --- a/libs/core/output.ts +++ b/libs/core/output.ts @@ -66,7 +66,7 @@ namespace motors { /** * Stops all motors */ - //% blockId=motorStopAll block="stop all motors" + //% blockId=motorStopAll block="stop all `icons.motorLarge`" //% weight=10 group="Motors" blockGap=8 export function stopAllMotors() { const b = mkCmd(Output.ALL, DAL.opOutputStop, 0) @@ -91,7 +91,7 @@ namespace motors { * @param motor the output connection that the motor is connected to * @param power the power from ``100`` full forward to ``-100`` full backward, eg: 50 */ - //% blockId=motorSetPower block="power %motor|to %power|%" + //% blockId=motorSetPower block="power `icons.motorLarge` %motor|to %power|%" //% weight=99 group="Motors" blockGap=8 //% power.min=-100 power.max=100 power(power: number) { @@ -114,7 +114,7 @@ namespace motors { * @param angle the degrees to rotate, eg: 360 * @param power the power from ``100`` full forward to ``-100`` full backward, eg: 50 */ - //% blockId=motorMove block="move %motor|by %angle|degrees at %power|%" + //% blockId=motorMove block="move `icons.motorLarge` %motor|by %angle|degrees at %power|%" //% weight=98 group="Motors" blockGap=8 //% power.min=-100 power.max=100 move(angle: number, power: number) { @@ -134,7 +134,7 @@ namespace motors { /** * Stops the motor */ - //% blockId=motorStop block="stop %motor" + //% blockId=motorStop block="stop `icons.motorLarge` %motor" //% weight=97 group="Motors" stop() { const b = mkCmd(this.port, DAL.opOutputStop, 1) @@ -146,7 +146,7 @@ namespace motors { * Sets the automatic brake on or off when the motor is off * @param brake a value indicating if the motor should break when off */ - //% blockId=outputMotorSetBrakeMode block="set %motor|brake %brake" + //% blockId=outputMotorSetBrakeMode block="set `icons.motorLarge` %motor|brake %brake" //% brake.fieldEditor=toggleonoff //% weight=60 group="Motors" blockGap=8 setBrake(brake: boolean) { @@ -156,7 +156,7 @@ namespace motors { /** * Reverses the motor polarity */ - //% blockId=motorSetReversed block="set %motor|reversed %reversed" + //% blockId=motorSetReversed block="set `icons.motorLarge` %motor|reversed %reversed" //% reversed.fieldEditor=toggleonoff //% weight=59 group="Motors" setReversed(reversed: boolean) { @@ -169,7 +169,7 @@ namespace motors { * Gets motor actual speed. * @param motor the port which connects to the motor */ - //% blockId=motorSpeed block="%motor|speed" + //% blockId=motorSpeed block="`icons.motorLarge` %motor|speed" //% weight=72 group="Motors" blockGap=8 speed(): number { return getMotorData(this.port).actualSpeed; @@ -179,7 +179,7 @@ namespace motors { * Gets motor step count. * @param motor the port which connects to the motor */ - //% blockId=motorCount block="%motor|count" + //% blockId=motorCount block="`icons.motorLarge` %motor|count" //% weight=71 group="Motors" blockGap=8 count(): number { return getMotorData(this.port).count; @@ -189,7 +189,7 @@ namespace motors { * Gets motor tacho count. * @param motor the port which connects to the motor */ - //% blockId=motorTachoCount block="%motor|tacho count" + //% blockId=motorTachoCount block="`icons.motorLarge` %motor|tacho count" //% weight=70 group="Motors" tachoCount(): number { return getMotorData(this.port).tachoCount;