This is only supported in beta (https://makecode.microbit.com/beta). Use imageLiteralColumns
and imageLiteralRows
.
For legacy reasons, the parameter should be a string; but it is really an Image runtime object.
/**
* TODO: describe your function here
*/
//% block="foo"
//% imageLiteral=1
//% imageLiteralColumns=12
//% imageLiteralRows=3
export function foo(i: string): void {
// this is not pretty but basically, i is an Image
let im = <Image><any>i;
im.showImage(0)
}
Open this in beta: https://makecode.microbit.org/beta#pub:_Fm582taEK8Ww