202 posts
Posted 28 January 2013 - 09:22 AM
I have tried to find information on the touch functionality of the advanced monitors, but I haven't been able to find much. Could someone please provide some information or a link to some?
Help is very much appreciated!
Thanks! :D/>
2088 posts
Location
South Africa
Posted 28 January 2013 - 09:48 AM
You will need to use os.pullEvent() and check for the event "monitor_touch". THe parameters returned are:
which button, x and y co-ords.
mon = peripheral.wrap("right") -- wrap monitor on the side...
mX, mY = mon.getSize() -- get the sizes of the monitor
while true do
e = { os.pullEvent() }
if e[1] == "monitor_touch" then
if e[3] == mX and e[4] == 1 then --
-- This would be the very top right of the monitor...
end
end
end