lcd.drawSwitch(x, y, switch, flags)
Draws a text representation of switch at (x,y)
@status current Introduced in 2.0.0
Parameters
x,y
(positive numbers) starting coordinateswitch
(number) number of switch to display, negative number displays negated switchflags
(unsigned number) drawing flags, only SMLSIZE, BLINK and INVERS.
Return value
none
Examples
local function run(event)
local source
lcd.clear()
lcd.drawText(1, 1,"drawSwitch() example", 0)
for source = 1, 5 do
lcd.drawSwitch(1, source * 10, source, 0)
lcd.drawText(20, source * 10, " is switch source number " .. source)
end
end
return{run=run}