Created
September 28, 2013 19:06
-
-
Save SageStarCodes/6745325 to your computer and use it in GitHub Desktop.
takto ziskas input...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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