SHOW:
|
|
- or go back to the newest paste.
1 | mon = peripheral.wrap("right") | |
2 | term.redirect(mon) | |
3 | local status = {"streichen.","abgelehnt.","angenommen."} | |
4 | local current = 1 | |
5 | local combo = "1" | |
6 | local lastTimer | |
7 | while true do | |
8 | term.clear() | |
9 | term.setCursorPos(1,1) | |
10 | print("Karte") | |
11 | print(status[current]) | |
12 | local event,arg1,arg2,arg3 = os.pullEvent() | |
13 | if event == "timer" and arg1 == lastTimer then | |
14 | current = 1 | |
15 | lastTimer = nil | |
16 | rs.setOutput("bottom",false) | |
17 | elseif event == "mag_swipe" then | |
18 | if arg1 == combo then | |
19 | lastTimer = os.startTimer(3) | |
20 | current = 3 | |
21 | - | rs.setOutput("right",true) |
21 | + | rs.setOutput("back",true) |
22 | else | |
23 | lastTimer = os.startTimer(3) | |
24 | current = 2 | |
25 | end | |
26 | end | |
27 | end |