DrawPointer(integer,table[,integer])
Description
Section titled “Description”The DrawPointer function draws a red pointer on the display. There can only be one pointer at a time on each station.
Arguments
Section titled “Arguments”- Integer:
This integer is the display index where the pointer should be drawn. - Table:
This key-value table must have ‘x’ and ‘y’ keys with values indicating a position on the display. See the example below. - Integer (optional):
This optional integer defines a duration for the pointer in milliseconds. It fades out. If a duration is not set, then it stays visible.
Return
Section titled “Return”This function does not return anything.
Example
Section titled “Example”This example draws a pointer on display 1 for 5 seconds:
| Copy CodeLua |
| ``` |
| return function() |
--Set a display indexlocal displayIndex = 1--Create and set the position in a tablelocal position = {}position.x = 150position.y = 25--Set a 5 seconds duration - in millisecondslocal duration = 5000--Draw the actual pointerDrawPointer(displayIndex,position,duration)end