Type Number Event mouse Revision Current Public Release (2017.3184) Keywords mouse, x
The mouse cursor's current x position on screen in content coordinates.
-- Called when a mouse event has been received. local function onMouseEvent( event ) -- Print the mouse cursor's current position to the log. local message = "Mouse Position = (" .. tostring(event.x) .. "," .. tostring(event.y) .. ")" print( message ) end -- Add the mouse event listener. Runtime:addEventListener( "mouse", onMouseEvent )