Difference between revisions of "Monitor touch (event)"
From ComputerCraft Wiki
(Created page with "{{Event |name=monitor_touch |desc=Fired when the player right click on an advanced monitor connected. |return1=The side of the advanced monitor. |return2=The X-coordinate of t...") |
m |
||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
{{Event | {{Event | ||
|name=monitor_touch | |name=monitor_touch |
Revision as of 10:46, 4 October 2013
Examples
Example | |
Print the side of the monitor and the co-ordinates of every mouse click we receive a monitor_touch event. | |
Code |
while true do event, side, xPos, yPos = os.pullEvent("monitor_touch") print(event .. " => Side: " .. tostring(side) .. ", " .. "X: " .. tostring(xPos) .. ", " .. "Y: " .. tostring(yPos)) end |
Output | The side of the advanced monitor, followed by the X and Y position of the event. |