Skip to content

Instantly share code, notes, and snippets.

@SageStarCodes
Created September 28, 2013 19:06
Show Gist options
  • Save SageStarCodes/6745325 to your computer and use it in GitHub Desktop.
Save SageStarCodes/6745325 to your computer and use it in GitHub Desktop.
takto ziskas input...
function input()
local e,side,x,y = os.pullEvent("monitor_touch")
result = master.checkxy(x,y)
if not result == nil then
term.restore()
print("result: "..result)
term.redirect(mon)
else
term.restore()
print("result: nil")
term.redirect(mon)
end
if result == "L" then
master.flash("L")
if screenNo > 1 then
screenNo = screenNo - 1
end
end
if result == "R" then
master.flash("R")
if screenNo < 3 then
screenNo = screenNo + 1
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment