From 30fe647f51a364760860e0b3517d012917950162 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Mon, 27 Feb 2017 10:51:52 -0800 Subject: [PATCH] more docs for show-arrow. correct errors --- docs/reference/basic.md | 1 + docs/reference/basic/show-arrow.md | 23 +++++++++++++++++++++++ docs/reference/basic/show-icon.md | 3 +-- libs/core/icons.ts | 2 ++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 docs/reference/basic/show-arrow.md diff --git a/docs/reference/basic.md b/docs/reference/basic.md index 7d519c38..9a07cf29 100644 --- a/docs/reference/basic.md +++ b/docs/reference/basic.md @@ -25,6 +25,7 @@ basic.plotLeds(` . . . . . . . . . . `); +basic.showArrow(ArrowNames.North); basic.showAnimation(` . . . . . . . . . . diff --git a/docs/reference/basic/show-arrow.md b/docs/reference/basic/show-arrow.md new file mode 100644 index 00000000..8c66a12b --- /dev/null +++ b/docs/reference/basic/show-arrow.md @@ -0,0 +1,23 @@ +# Show Arrow + +Shows the selected arrow on the LED screen + +```sig +basic.showArrow(ArrowNames.North) +``` + +### Example + +This program shows all eight arrows. + +```blocks +for (let index = 0; index <= 7; index++) { + basic.showArrow(index) + basic.pause(300) +} +``` + +### See also + +[showIcon](/reference/basic/show-icon), +[showLeds](/reference/basic/show-leds) \ No newline at end of file diff --git a/docs/reference/basic/show-icon.md b/docs/reference/basic/show-icon.md index 876f3aea..342026a8 100644 --- a/docs/reference/basic/show-icon.md +++ b/docs/reference/basic/show-icon.md @@ -18,5 +18,4 @@ basic.showIcon(IconNames.Sad) ### See also -[show leds](/reference/led/show-leds) - +[showLeds](/reference/basic/show-leds) \ No newline at end of file diff --git a/libs/core/icons.ts b/libs/core/icons.ts index 5622e094..75a2593a 100644 --- a/libs/core/icons.ts +++ b/libs/core/icons.ts @@ -136,6 +136,7 @@ namespace basic { //% blockId=basic_show_icon //% block="show icon %i" icon="\uf00a" //% parts="ledmatrix" + //% help=basic/show-icon export function showIcon(icon: IconNames) { let res = images.iconImage(icon) res.showImage(0) @@ -146,6 +147,7 @@ namespace basic { //% block="show arrow %i=device_arrow" //% parts="ledmatrix" //% advanced=true + //% help=basic/show-arrow export function showArrow(i: number) { let res = images.arrowImage(i) res.showImage(0)