on.arrowRight

From Inspired-Lua Wiki
Jump to: navigation, search

on.arrowRight() is an event handler.
This handler get called when the right arrow key gets pressed.

Example[edit]

msg = ""
 
function on.paint(gc)
	gc:drawString(msg, 10, 10, "top")
end
 
function on.arrowUp()
	msg = "Key up"
	platform.window:invalidate()
end
 
function on.arrowDown()
	msg = "Key down"
	platform.window:invalidate()
end
 
function on.arrowLeft()
	msg = "Key left"
	platform.window:invalidate()
end
 
function on.arrowRight()
	msg = "Key right"
	platform.window:invalidate()
end

See Also[edit]