for compatibility, make all existing extension menus accept reporters

This commit is contained in:
Christopher Willis-Ford 2019-04-29 13:07:08 -07:00
parent cfee656306
commit 33a6071466
11 changed files with 556 additions and 445 deletions

View file

@ -541,7 +541,7 @@ class BoostMotor {
BoostMotorProfile.DO_NOT_USE BoostMotorProfile.DO_NOT_USE
] ]
); );
if (resetState) this.status = BoostMotorState.ON_FOR_ROTATION; if (resetState) this.status = BoostMotorState.ON_FOR_ROTATION;
this._pendingPositionDestination = this.position + (degrees * this.direction * direction); this._pendingPositionDestination = this.position + (degrees * this.direction * direction);
this._parent.send(BoostBLE.characteristic, cmd); this._parent.send(BoostBLE.characteristic, cmd);
@ -1428,246 +1428,267 @@ class Scratch3BoostBlocks {
} }
], ],
menus: { menus: {
MOTOR_ID: [ MOTOR_ID: {
{ acceptReporters: true,
text: formatMessage({ items: [
id: 'boost.motorId.a', {
default: BoostMotorLabel.A, text: formatMessage({
description: `label for motor A element in motor menu for LEGO Boost extension` id: 'boost.motorId.a',
}), default: BoostMotorLabel.A,
value: BoostMotorLabel.A description: `label for motor A element in motor menu for LEGO Boost extension`
}, }),
{ value: BoostMotorLabel.A
text: formatMessage({ },
id: 'boost.motorId.b', {
default: BoostMotorLabel.B, text: formatMessage({
description: `label for motor B element in motor menu for LEGO Boost extension` id: 'boost.motorId.b',
}), default: BoostMotorLabel.B,
value: BoostMotorLabel.B description: `label for motor B element in motor menu for LEGO Boost extension`
}, }),
{ value: BoostMotorLabel.B
text: formatMessage({ },
id: 'boost.motorId.c', {
default: BoostMotorLabel.C, text: formatMessage({
description: `label for motor C element in motor menu for LEGO Boost extension` id: 'boost.motorId.c',
}), default: BoostMotorLabel.C,
value: BoostMotorLabel.C description: `label for motor C element in motor menu for LEGO Boost extension`
}, }),
{ value: BoostMotorLabel.C
text: formatMessage({ },
id: 'boost.motorId.d', {
default: BoostMotorLabel.D, text: formatMessage({
description: `label for motor D element in motor menu for LEGO Boost extension` id: 'boost.motorId.d',
}), default: BoostMotorLabel.D,
value: BoostMotorLabel.D description: `label for motor D element in motor menu for LEGO Boost extension`
}, }),
{ value: BoostMotorLabel.D
text: formatMessage({ },
id: 'boost.motorId.ab', {
default: BoostMotorLabel.AB, text: formatMessage({
description: `label for motor A and B element in motor menu for LEGO Boost extension` id: 'boost.motorId.ab',
}), default: BoostMotorLabel.AB,
value: BoostMotorLabel.AB description: `label for motor A and B element in motor menu for LEGO Boost extension`
}, }),
{ value: BoostMotorLabel.AB
text: formatMessage({ },
id: 'boost.motorId.all', {
default: BoostMotorLabel.ALL, text: formatMessage({
description: 'label for all motors element in motor menu for LEGO Boost extension' id: 'boost.motorId.all',
}), default: BoostMotorLabel.ALL,
value: BoostMotorLabel.ALL description: 'label for all motors element in motor menu for LEGO Boost extension'
} }),
], value: BoostMotorLabel.ALL
MOTOR_REPORTER_ID: [ }
{ ]
text: formatMessage({ },
id: 'boost.motorReporterId.a', MOTOR_REPORTER_ID: {
default: BoostMotorLabel.A, acceptReporters: true,
description: 'label for motor A element in motor menu for LEGO Boost extension' items: [
}), {
value: BoostMotorLabel.A text: formatMessage({
}, id: 'boost.motorReporterId.a',
{ default: BoostMotorLabel.A,
text: formatMessage({ description: 'label for motor A element in motor menu for LEGO Boost extension'
id: 'boost.motorReporterId.b', }),
default: BoostMotorLabel.B, value: BoostMotorLabel.A
description: 'label for motor B element in motor menu for LEGO Boost extension' },
}), {
value: BoostMotorLabel.B text: formatMessage({
}, id: 'boost.motorReporterId.b',
{ default: BoostMotorLabel.B,
text: formatMessage({ description: 'label for motor B element in motor menu for LEGO Boost extension'
id: 'boost.motorReporterId.c', }),
default: BoostMotorLabel.C, value: BoostMotorLabel.B
description: 'label for motor C element in motor menu for LEGO Boost extension' },
}), {
value: BoostMotorLabel.C text: formatMessage({
}, id: 'boost.motorReporterId.c',
{ default: BoostMotorLabel.C,
text: formatMessage({ description: 'label for motor C element in motor menu for LEGO Boost extension'
id: 'boost.motorReporterId.d', }),
default: BoostMotorLabel.D, value: BoostMotorLabel.C
description: 'label for motor D element in motor menu for LEGO Boost extension' },
}), {
value: BoostMotorLabel.D text: formatMessage({
} id: 'boost.motorReporterId.d',
], default: BoostMotorLabel.D,
MOTOR_DIRECTION: [ description: 'label for motor D element in motor menu for LEGO Boost extension'
{ }),
text: formatMessage({ value: BoostMotorLabel.D
id: 'boost.motorDirection.forward', }
default: 'this way', ]
description: 'label for forward element in motor direction menu for LEGO Boost extension' },
}), MOTOR_DIRECTION: {
value: BoostMotorDirection.FORWARD acceptReporters: true,
}, items: [
{ {
text: formatMessage({ text: formatMessage({
id: 'boost.motorDirection.backward', id: 'boost.motorDirection.forward',
default: 'that way', default: 'this way',
description: 'label for backward element in motor direction menu for LEGO Boost extension' description:
}), 'label for forward element in motor direction menu for LEGO Boost extension'
value: BoostMotorDirection.BACKWARD }),
}, value: BoostMotorDirection.FORWARD
{ },
text: formatMessage({ {
id: 'boost.motorDirection.reverse', text: formatMessage({
default: 'reverse', id: 'boost.motorDirection.backward',
description: 'label for reverse element in motor direction menu for LEGO Boost extension' default: 'that way',
}), description:
value: BoostMotorDirection.REVERSE 'label for backward element in motor direction menu for LEGO Boost extension'
} }),
], value: BoostMotorDirection.BACKWARD
TILT_DIRECTION: [ },
{ {
text: formatMessage({ text: formatMessage({
id: 'boost.tiltDirection.up', id: 'boost.motorDirection.reverse',
default: 'up', default: 'reverse',
description: 'label for up element in tilt direction menu for LEGO Boost extension' description:
}), 'label for reverse element in motor direction menu for LEGO Boost extension'
value: BoostTiltDirection.UP }),
}, value: BoostMotorDirection.REVERSE
{ }
text: formatMessage({ ]
id: 'boost.tiltDirection.down', },
default: 'down', TILT_DIRECTION: {
description: 'label for down element in tilt direction menu for LEGO Boost extension' acceptReporters: true,
}), items: [
value: BoostTiltDirection.DOWN {
}, text: formatMessage({
{ id: 'boost.tiltDirection.up',
text: formatMessage({ default: 'up',
id: 'boost.tiltDirection.left', description: 'label for up element in tilt direction menu for LEGO Boost extension'
default: 'left', }),
description: 'label for left element in tilt direction menu for LEGO Boost extension' value: BoostTiltDirection.UP
}), },
value: BoostTiltDirection.LEFT {
}, text: formatMessage({
{ id: 'boost.tiltDirection.down',
text: formatMessage({ default: 'down',
id: 'boost.tiltDirection.right', description: 'label for down element in tilt direction menu for LEGO Boost extension'
default: 'right', }),
description: 'label for right element in tilt direction menu for LEGO Boost extension' value: BoostTiltDirection.DOWN
}), },
value: BoostTiltDirection.RIGHT {
} text: formatMessage({
], id: 'boost.tiltDirection.left',
TILT_DIRECTION_ANY: [ default: 'left',
{ description: 'label for left element in tilt direction menu for LEGO Boost extension'
text: formatMessage({ }),
id: 'boost.tiltDirection.up', value: BoostTiltDirection.LEFT
default: 'up' },
}), {
value: BoostTiltDirection.UP text: formatMessage({
}, id: 'boost.tiltDirection.right',
{ default: 'right',
text: formatMessage({ description: 'label for right element in tilt direction menu for LEGO Boost extension'
id: 'boost.tiltDirection.down', }),
default: 'down' value: BoostTiltDirection.RIGHT
}), }
value: BoostTiltDirection.DOWN ]
}, },
{ TILT_DIRECTION_ANY: {
text: formatMessage({ acceptReporters: true,
id: 'boost.tiltDirection.left', items: [
default: 'left' {
}), text: formatMessage({
value: BoostTiltDirection.LEFT id: 'boost.tiltDirection.up',
}, default: 'up'
{ }),
text: formatMessage({ value: BoostTiltDirection.UP
id: 'boost.tiltDirection.right', },
default: 'right' {
}), text: formatMessage({
value: BoostTiltDirection.RIGHT id: 'boost.tiltDirection.down',
}, default: 'down'
{ }),
text: formatMessage({ value: BoostTiltDirection.DOWN
id: 'boost.tiltDirection.any', },
default: 'any', {
description: 'label for any element in tilt direction menu for LEGO Boost extension' text: formatMessage({
}), id: 'boost.tiltDirection.left',
value: BoostTiltDirection.ANY default: 'left'
} }),
], value: BoostTiltDirection.LEFT
COLOR: [ },
{ {
text: formatMessage({ text: formatMessage({
id: 'boost.color.red', id: 'boost.tiltDirection.right',
default: 'red', default: 'right'
description: 'the color red' }),
}), value: BoostTiltDirection.RIGHT
value: BoostColor.RED },
}, {
{ text: formatMessage({
text: formatMessage({ id: 'boost.tiltDirection.any',
id: 'boost.color.blue', default: 'any',
default: 'blue', description: 'label for any element in tilt direction menu for LEGO Boost extension'
description: 'the color blue' }),
}), value: BoostTiltDirection.ANY
value: BoostColor.BLUE }
}, ]
{ },
text: formatMessage({ COLOR: {
id: 'boost.color.green', acceptReporters: true,
default: 'green', items: [
description: 'the color green' {
}), text: formatMessage({
value: BoostColor.GREEN id: 'boost.color.red',
}, default: 'red',
{ description: 'the color red'
text: formatMessage({ }),
id: 'boost.color.yellow', value: BoostColor.RED
default: 'yellow', },
description: 'the color yellow' {
}), text: formatMessage({
value: BoostColor.YELLOW id: 'boost.color.blue',
}, default: 'blue',
{ description: 'the color blue'
text: formatMessage({ }),
id: 'boost.color.white', value: BoostColor.BLUE
default: 'white', },
desription: 'the color white' {
}), text: formatMessage({
value: BoostColor.WHITE id: 'boost.color.green',
}, default: 'green',
{ description: 'the color green'
text: formatMessage({ }),
id: 'boost.color.black', value: BoostColor.GREEN
default: 'black', },
description: 'the color black' {
}), text: formatMessage({
value: BoostColor.BLACK id: 'boost.color.yellow',
}, default: 'yellow',
{ description: 'the color yellow'
text: formatMessage({ }),
id: 'boost.color.any', value: BoostColor.YELLOW
default: 'any color', },
description: 'any color' {
}), text: formatMessage({
value: BoostColor.ANY id: 'boost.color.white',
} default: 'white',
] desription: 'the color white'
}),
value: BoostColor.WHITE
},
{
text: formatMessage({
id: 'boost.color.black',
default: 'black',
description: 'the color black'
}),
value: BoostColor.BLACK
},
{
text: formatMessage({
id: 'boost.color.any',
default: 'any color',
description: 'any color'
}),
value: BoostColor.ANY
}
]
}
} }
}; };
} }

View file

@ -1112,8 +1112,14 @@ class Scratch3Ev3Blocks {
} }
], ],
menus: { menus: {
motorPorts: this._formatMenu(Ev3MotorMenu), motorPorts: {
sensorPorts: this._formatMenu(Ev3SensorMenu) acceptReporters: true,
items: this._formatMenu(Ev3MotorMenu)
},
sensorPorts: {
acceptReporters: true,
items: this._formatMenu(Ev3SensorMenu)
}
} }
}; };
} }

View file

@ -757,11 +757,26 @@ class Scratch3GdxForBlocks {
} }
], ],
menus: { menus: {
pushPullOptions: this.PUSH_PULL_MENU, pushPullOptions: {
gestureOptions: this.GESTURE_MENU, acceptReporters: true,
axisOptions: this.AXIS_MENU, items: this.PUSH_PULL_MENU
tiltOptions: this.TILT_MENU, },
tiltAnyOptions: this.TILT_MENU_ANY gestureOptions: {
acceptReporters: true,
items: this.GESTURE_MENU
},
axisOptions: {
acceptReporters: true,
items: this.AXIS_MENU
},
tiltOptions: {
acceptReporters: true,
items: this.TILT_MENU
},
tiltAnyOptions: {
acceptReporters: true,
items: this.TILT_MENU_ANY
}
} }
}; };
} }

View file

@ -207,55 +207,61 @@ class Scratch3MakeyMakeyBlocks {
} }
], ],
menus: { menus: {
KEY: [ KEY: {
{ acceptReporters: true,
text: formatMessage({ items: [
id: 'makeymakey.spaceKey', {
default: 'space', text: formatMessage({
description: 'The space key on a computer keyboard.' id: 'makeymakey.spaceKey',
}), default: 'space',
value: KEY_ID_SPACE description: 'The space key on a computer keyboard.'
}, }),
{ value: KEY_ID_SPACE
text: formatMessage({ },
id: 'makeymakey.upArrow', {
default: 'up arrow', text: formatMessage({
description: 'The up arrow key on a computer keyboard.' id: 'makeymakey.upArrow',
}), default: 'up arrow',
value: KEY_ID_UP description: 'The up arrow key on a computer keyboard.'
}, }),
{ value: KEY_ID_UP
text: formatMessage({ },
id: 'makeymakey.downArrow', {
default: 'down arrow', text: formatMessage({
description: 'The down arrow key on a computer keyboard.' id: 'makeymakey.downArrow',
}), default: 'down arrow',
value: KEY_ID_DOWN description: 'The down arrow key on a computer keyboard.'
}, }),
{ value: KEY_ID_DOWN
text: formatMessage({ },
id: 'makeymakey.rightArrow', {
default: 'right arrow', text: formatMessage({
description: 'The right arrow key on a computer keyboard.' id: 'makeymakey.rightArrow',
}), default: 'right arrow',
value: KEY_ID_RIGHT description: 'The right arrow key on a computer keyboard.'
}, }),
{ value: KEY_ID_RIGHT
text: formatMessage({ },
id: 'makeymakey.leftArrow', {
default: 'left arrow', text: formatMessage({
description: 'The left arrow key on a computer keyboard.' id: 'makeymakey.leftArrow',
}), default: 'left arrow',
value: KEY_ID_LEFT description: 'The left arrow key on a computer keyboard.'
}, }),
{text: 'w', value: 'w'}, value: KEY_ID_LEFT
{text: 'a', value: 'a'}, },
{text: 's', value: 's'}, {text: 'w', value: 'w'},
{text: 'd', value: 'd'}, {text: 'a', value: 'a'},
{text: 'f', value: 'f'}, {text: 's', value: 's'},
{text: 'g', value: 'g'} {text: 'd', value: 'd'},
], {text: 'f', value: 'f'},
SEQUENCE: this.buildSequenceMenu(this.DEFAULT_SEQUENCES) {text: 'g', value: 'g'}
]
},
SEQUENCE: {
acceptReporters: true,
items: this.buildSequenceMenu(this.DEFAULT_SEQUENCES)
}
} }
}; };
} }

View file

@ -746,12 +746,30 @@ class Scratch3MicroBitBlocks {
} }
], ],
menus: { menus: {
buttons: this.BUTTONS_MENU, buttons: {
gestures: this.GESTURES_MENU, acceptReporters: true,
pinState: this.PIN_STATE_MENU, items: this.BUTTONS_MENU
tiltDirection: this.TILT_DIRECTION_MENU, },
tiltDirectionAny: this.TILT_DIRECTION_ANY_MENU, gestures: {
touchPins: ['0', '1', '2'] acceptReporters: true,
items: this.GESTURES_MENU
},
pinState: {
acceptReporters: true,
items: this.PIN_STATE_MENU
},
tiltDirection: {
acceptReporters: true,
items: this.TILT_DIRECTION_MENU
},
tiltDirectionAny: {
acceptReporters: true,
items: this.TILT_DIRECTION_ANY_MENU
},
touchPins: {
acceptReporters: true,
items: ['0', '1', '2']
}
} }
}; };
} }

View file

@ -911,8 +911,14 @@ class Scratch3MusicBlocks {
} }
], ],
menus: { menus: {
DRUM: this._buildMenu(this.DRUM_INFO), DRUM: {
INSTRUMENT: this._buildMenu(this.INSTRUMENT_INFO) acceptReporters: true,
items: this._buildMenu(this.DRUM_INFO)
},
INSTRUMENT: {
acceptReporters: true,
items: this._buildMenu(this.INSTRUMENT_INFO)
}
} }
}; };
} }

View file

@ -477,7 +477,10 @@ class Scratch3PenBlocks {
} }
], ],
menus: { menus: {
colorParam: this._initColorParam() colorParam: {
acceptReporters: true,
items: this._initColorParam()
}
} }
}; };
} }

View file

@ -462,8 +462,14 @@ class Scratch3Text2SpeechBlocks {
} }
], ],
menus: { menus: {
voices: this.getVoiceMenu(), voices: {
languages: this.getLanguageMenu() acceptReporters: true,
items: this.getVoiceMenu()
},
languages: {
acceptReporters: true,
items: this.getLanguageMenu()
}
} }
}; };
} }

View file

@ -146,7 +146,10 @@ class Scratch3TranslateBlocks {
} }
], ],
menus: { menus: {
languages: this._supportedLanguages languages: {
acceptReporters: true,
items: this._supportedLanguages
}
} }
}; };
} }

View file

@ -488,9 +488,18 @@ class Scratch3VideoSensingBlocks {
} }
], ],
menus: { menus: {
ATTRIBUTE: this._buildMenu(this.ATTRIBUTE_INFO), ATTRIBUTE: {
SUBJECT: this._buildMenu(this.SUBJECT_INFO), acceptReporters: true,
VIDEO_STATE: this._buildMenu(this.VIDEO_STATE_INFO) items: this._buildMenu(this.ATTRIBUTE_INFO)
},
SUBJECT: {
acceptReporters: true,
items: this._buildMenu(this.SUBJECT_INFO)
},
VIDEO_STATE: {
acceptReporters: true,
items: this._buildMenu(this.VIDEO_STATE_INFO)
}
} }
}; };
} }

View file

@ -1134,139 +1134,157 @@ class Scratch3WeDo2Blocks {
} }
], ],
menus: { menus: {
MOTOR_ID: [ MOTOR_ID: {
{ acceptReporters: true,
text: formatMessage({ items: [
id: 'wedo2.motorId.default', {
default: 'motor', text: formatMessage({
description: 'label for motor element in motor menu for LEGO WeDo 2 extension' id: 'wedo2.motorId.default',
}), default: 'motor',
value: WeDo2MotorLabel.DEFAULT description: 'label for motor element in motor menu for LEGO WeDo 2 extension'
}, }),
{ value: WeDo2MotorLabel.DEFAULT
text: formatMessage({ },
id: 'wedo2.motorId.a', {
default: 'motor A', text: formatMessage({
description: 'label for motor A element in motor menu for LEGO WeDo 2 extension' id: 'wedo2.motorId.a',
}), default: 'motor A',
value: WeDo2MotorLabel.A description: 'label for motor A element in motor menu for LEGO WeDo 2 extension'
}, }),
{ value: WeDo2MotorLabel.A
text: formatMessage({ },
id: 'wedo2.motorId.b', {
default: 'motor B', text: formatMessage({
description: 'label for motor B element in motor menu for LEGO WeDo 2 extension' id: 'wedo2.motorId.b',
}), default: 'motor B',
value: WeDo2MotorLabel.B description: 'label for motor B element in motor menu for LEGO WeDo 2 extension'
}, }),
{ value: WeDo2MotorLabel.B
text: formatMessage({ },
id: 'wedo2.motorId.all', {
default: 'all motors', text: formatMessage({
description: 'label for all motors element in motor menu for LEGO WeDo 2 extension' id: 'wedo2.motorId.all',
}), default: 'all motors',
value: WeDo2MotorLabel.ALL description: 'label for all motors element in motor menu for LEGO WeDo 2 extension'
} }),
], value: WeDo2MotorLabel.ALL
MOTOR_DIRECTION: [ }
{ ]
text: formatMessage({ },
id: 'wedo2.motorDirection.forward', MOTOR_DIRECTION: {
default: 'this way', acceptReporters: true,
description: 'label for forward element in motor direction menu for LEGO WeDo 2 extension' items: [
}), {
value: WeDo2MotorDirection.FORWARD text: formatMessage({
}, id: 'wedo2.motorDirection.forward',
{ default: 'this way',
text: formatMessage({ description:
id: 'wedo2.motorDirection.backward', 'label for forward element in motor direction menu for LEGO WeDo 2 extension'
default: 'that way', }),
description: 'label for backward element in motor direction menu for LEGO WeDo 2 extension' value: WeDo2MotorDirection.FORWARD
}), },
value: WeDo2MotorDirection.BACKWARD {
}, text: formatMessage({
{ id: 'wedo2.motorDirection.backward',
text: formatMessage({ default: 'that way',
id: 'wedo2.motorDirection.reverse', description:
default: 'reverse', 'label for backward element in motor direction menu for LEGO WeDo 2 extension'
description: 'label for reverse element in motor direction menu for LEGO WeDo 2 extension' }),
}), value: WeDo2MotorDirection.BACKWARD
value: WeDo2MotorDirection.REVERSE },
} {
], text: formatMessage({
TILT_DIRECTION: [ id: 'wedo2.motorDirection.reverse',
{ default: 'reverse',
text: formatMessage({ description:
id: 'wedo2.tiltDirection.up', 'label for reverse element in motor direction menu for LEGO WeDo 2 extension'
default: 'up', }),
description: 'label for up element in tilt direction menu for LEGO WeDo 2 extension' value: WeDo2MotorDirection.REVERSE
}), }
value: WeDo2TiltDirection.UP ]
}, },
{ TILT_DIRECTION: {
text: formatMessage({ acceptReporters: true,
id: 'wedo2.tiltDirection.down', items: [
default: 'down', {
description: 'label for down element in tilt direction menu for LEGO WeDo 2 extension' text: formatMessage({
}), id: 'wedo2.tiltDirection.up',
value: WeDo2TiltDirection.DOWN default: 'up',
}, description: 'label for up element in tilt direction menu for LEGO WeDo 2 extension'
{ }),
text: formatMessage({ value: WeDo2TiltDirection.UP
id: 'wedo2.tiltDirection.left', },
default: 'left', {
description: 'label for left element in tilt direction menu for LEGO WeDo 2 extension' text: formatMessage({
}), id: 'wedo2.tiltDirection.down',
value: WeDo2TiltDirection.LEFT default: 'down',
}, description: 'label for down element in tilt direction menu for LEGO WeDo 2 extension'
{ }),
text: formatMessage({ value: WeDo2TiltDirection.DOWN
id: 'wedo2.tiltDirection.right', },
default: 'right', {
description: 'label for right element in tilt direction menu for LEGO WeDo 2 extension' text: formatMessage({
}), id: 'wedo2.tiltDirection.left',
value: WeDo2TiltDirection.RIGHT default: 'left',
} description: 'label for left element in tilt direction menu for LEGO WeDo 2 extension'
], }),
TILT_DIRECTION_ANY: [ value: WeDo2TiltDirection.LEFT
{ },
text: formatMessage({ {
id: 'wedo2.tiltDirection.up', text: formatMessage({
default: 'up' id: 'wedo2.tiltDirection.right',
}), default: 'right',
value: WeDo2TiltDirection.UP description: 'label for right element in tilt direction menu for LEGO WeDo 2 extension'
}, }),
{ value: WeDo2TiltDirection.RIGHT
text: formatMessage({ }
id: 'wedo2.tiltDirection.down', ]
default: 'down' },
}), TILT_DIRECTION_ANY: {
value: WeDo2TiltDirection.DOWN acceptReporters: true,
}, items: [
{ {
text: formatMessage({ text: formatMessage({
id: 'wedo2.tiltDirection.left', id: 'wedo2.tiltDirection.up',
default: 'left' default: 'up'
}), }),
value: WeDo2TiltDirection.LEFT value: WeDo2TiltDirection.UP
}, },
{ {
text: formatMessage({ text: formatMessage({
id: 'wedo2.tiltDirection.right', id: 'wedo2.tiltDirection.down',
default: 'right' default: 'down'
}), }),
value: WeDo2TiltDirection.RIGHT value: WeDo2TiltDirection.DOWN
}, },
{ {
text: formatMessage({ text: formatMessage({
id: 'wedo2.tiltDirection.any', id: 'wedo2.tiltDirection.left',
default: 'any', default: 'left'
description: 'label for any element in tilt direction menu for LEGO WeDo 2 extension' }),
}), value: WeDo2TiltDirection.LEFT
value: WeDo2TiltDirection.ANY },
} {
], text: formatMessage({
OP: ['<', '>'] id: 'wedo2.tiltDirection.right',
default: 'right'
}),
value: WeDo2TiltDirection.RIGHT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.any',
default: 'any',
description: 'label for any element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.ANY
}
]
},
OP: {
acceptReporters: true,
items: ['<', '>']
}
} }
}; };
} }