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.
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