add one image to make it spiffy
This commit is contained in:
parent
f944af8122
commit
ff7b229a3a
@ -55,6 +55,7 @@
|
|||||||
"Gesture.TiltLeft|block": "tilt left",
|
"Gesture.TiltLeft|block": "tilt left",
|
||||||
"Gesture.TiltRight": "Raised when the screen is pointing right",
|
"Gesture.TiltRight": "Raised when the screen is pointing right",
|
||||||
"Gesture.TiltRight|block": "tilt right",
|
"Gesture.TiltRight|block": "tilt right",
|
||||||
|
"IconNames.Heart|block": "heart",
|
||||||
"LedSpriteProperty.Blink|block": "blink",
|
"LedSpriteProperty.Blink|block": "blink",
|
||||||
"LedSpriteProperty.Brightness|block": "brightness",
|
"LedSpriteProperty.Brightness|block": "brightness",
|
||||||
"LedSpriteProperty.Direction|block": "direction",
|
"LedSpriteProperty.Direction|block": "direction",
|
||||||
@ -121,7 +122,7 @@
|
|||||||
"game|block": "game",
|
"game|block": "game",
|
||||||
"images.createBigImage|block": "create big image",
|
"images.createBigImage|block": "create big image",
|
||||||
"images.createImage|block": "create image",
|
"images.createImage|block": "create image",
|
||||||
"images|block": "happy",
|
"images|block": "images",
|
||||||
"input.acceleration|block": "acceleration (mg)|%NAME",
|
"input.acceleration|block": "acceleration (mg)|%NAME",
|
||||||
"input.buttonIsPressed|block": "button|%NAME|is pressed",
|
"input.buttonIsPressed|block": "button|%NAME|is pressed",
|
||||||
"input.compassHeading|block": "compass heading (°)",
|
"input.compassHeading|block": "compass heading (°)",
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
// this doesn't work//% block=happy enumval=0 blockImage=1
|
enum IconNames {
|
||||||
namespace images {
|
//% enumval=0 block="heart" blockImage=1
|
||||||
|
|
||||||
export enum IconNames {
|
|
||||||
Heart = 0,
|
Heart = 0,
|
||||||
SmallHeart,
|
SmallHeart,
|
||||||
|
|
||||||
@ -49,6 +47,32 @@ export enum IconNames {
|
|||||||
SmallSquare
|
SmallSquare
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace basic {
|
||||||
|
|
||||||
|
//% weight=50
|
||||||
|
//% blockId=basic_show_arrow block="show arrow %i=device_arrow"
|
||||||
|
export function showArrow(i: number) {
|
||||||
|
let res = images.arrowImage(i)
|
||||||
|
res.showImage(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
//% weight=50
|
||||||
|
//% blockId=basic_show_hour block="show hour %i=device_hour"
|
||||||
|
export function showHour(i: number) {
|
||||||
|
let res = images.hourImage(i)
|
||||||
|
res.showImage(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
//% weight=90
|
||||||
|
//% blockId=basic_show_icon block="show icon %i"
|
||||||
|
export function showIcon(i: IconNames) {
|
||||||
|
let res = images.iconImage(i)
|
||||||
|
res.showImage(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace images {
|
||||||
|
|
||||||
export enum ArrowNames {
|
export enum ArrowNames {
|
||||||
North = 0,
|
North = 0,
|
||||||
NorthEast,
|
NorthEast,
|
||||||
@ -649,27 +673,3 @@ export enum HourNames {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace basic {
|
|
||||||
|
|
||||||
//% weight=50
|
|
||||||
//% blockId=basic_show_arrow block="show arrow %i=device_arrow"
|
|
||||||
export function showArrow(i: number) {
|
|
||||||
let res = images.arrowImage(i)
|
|
||||||
res.showImage(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//% weight=50
|
|
||||||
//% blockId=basic_show_hour block="show hour %i=device_hour"
|
|
||||||
export function showHour(i: number) {
|
|
||||||
let res = images.hourImage(i)
|
|
||||||
res.showImage(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//% weight=90
|
|
||||||
//% blockId=basic_show_icon block="show icon %i"
|
|
||||||
export function showIcon(i: images.IconNames) {
|
|
||||||
let res = images.iconImage(i)
|
|
||||||
res.showImage(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user