diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index 8206a063..5086a2c8 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -91,6 +91,7 @@ "IconNames.Rabbit|block": "rabbit", "IconNames.Rollerskate|block": "roller skate", "IconNames.Sad|block": "sad", + "IconNames.Scissors|block": "scissors", "IconNames.Silly|block": "silly", "IconNames.Skull|block": "skull", "IconNames.SmallDiamond|block": "small diamond", diff --git a/libs/core/icons.ts b/libs/core/icons.ts index 1464e7cd..af666250 100644 --- a/libs/core/icons.ts +++ b/libs/core/icons.ts @@ -142,7 +142,10 @@ enum IconNames { Square, //% block="small square" //% blockImage=1 - SmallSquare + SmallSquare, + //% block="scissors" + //% blockImage=1 + Scissors } enum ArrowNames { @@ -174,6 +177,9 @@ namespace basic { //% block="show icon %i" icon="\uf00a" //% parts="ledmatrix" //% help=basic/show-icon + //% blockFieldEditor="FieldGridPicker" + //% blockFieldEditorParams.width=500 blockFieldEditorParams.columns=5 + //% blockFieldEditorParams.itemColour=black blockFieldEditorParams.tooltips=true export function showIcon(icon: IconNames) { let res = images.iconImage(icon) res.showImage(0) @@ -380,6 +386,12 @@ namespace images { . # . # . . # # # . . . . . .`; + case IconNames.Scissors: return ` + # # . . # + # # . # . + . . # . . + # # . # . + # # . . #`; // The following images were designed by Abbie Brooks. case IconNames.TShirt: return ` # # . # # diff --git a/sim/public/blocks/iconnames/scissors.png b/sim/public/blocks/iconnames/scissors.png new file mode 100644 index 00000000..1bfc69f4 Binary files /dev/null and b/sim/public/blocks/iconnames/scissors.png differ diff --git a/theme/style.less b/theme/style.less index 650bac34..35e06f78 100644 --- a/theme/style.less +++ b/theme/style.less @@ -85,6 +85,15 @@ span.blocklyTreeLabel { &:extend(.pink all); } +/* Blockly Field: Grid picker */ +.blocklyGridPickerTooltip { + padding: 3px 5px; + background-color: #fefefe; + border: black solid 3px; + color: black; + border-radius: 10px; +} + /******************************* Monaco *******************************/