2019-12-02 05:58:26 +01:00
|
|
|
# arrow Image
|
|
|
|
|
|
|
|
Create an arrow shaped [image](/reference/images/image) for the [LED screen](/device/screen).
|
|
|
|
|
|
|
|
```sig
|
|
|
|
images.arrowImage(ArrowNames.North)
|
|
|
|
```
|
|
|
|
|
|
|
|
The arrow points in the direction of the arrow name you choose, like `North`.
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
* **i**: the arrow name to make an arrow [image](/reference/images/image) for. You can make an arrow image that points in one of these directions:
|
|
|
|
|
|
|
|
>* `North`
|
|
|
|
>* `NorthEast`
|
|
|
|
>* `East`
|
|
|
|
>* `SouthEast`
|
|
|
|
>* `South`
|
|
|
|
>* `SouthWest`
|
|
|
|
>* `West`
|
|
|
|
>* `NorthWest`
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
Display a left arrow when button A is pressed or a right arrow when button B is pressed.
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
let arrowLeft = images.arrowImage(ArrowNames.West)
|
|
|
|
let arrowRight = images.arrowImage(ArrowNames.East)
|
|
|
|
|
2020-03-19 16:26:40 +01:00
|
|
|
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
2019-12-02 05:58:26 +01:00
|
|
|
arrowLeft.showImage(0);
|
|
|
|
});
|
2020-03-19 16:26:40 +01:00
|
|
|
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
|
2019-12-02 05:58:26 +01:00
|
|
|
arrowRight.showImage(0);
|
|
|
|
});
|
|
|
|
```
|
|
|
|
## See also
|
|
|
|
|
|
|
|
[arrow number](/reference/images/arrow-number)
|