SHOW:
|
|
- or go back to the newest paste.
1 | shell.run("label set wwm") | |
2 | m=peripheral.wrap("top") | |
3 | - | m.setBackground(colors.white) |
3 | + | m.setBackgroundColor(colors.white) |
4 | m.setTextColor(colors.black) | |
5 | - | m.setCursorPos(1.2) |
5 | + | |
6 | fa={ | |
7 | "Wer ist dein Lieblings Moderator?", | |
8 | "ecco7777", | |
9 | "Kegler01", | |
10 | "2Zwo2", | |
11 | "erdberbär11", | |
12 | 1 | |
13 | } | |
14 | c=1 | |
15 | while true do | |
16 | m.setBackgroundColor(colors.white) | |
17 | m.setTextColor(colors.black) | |
18 | m.clear() | |
19 | m.setCursorPos(1,1) | |
20 | m.write(fa[c]) | |
21 | m.setBackgroundColor(colors.blue) | |
22 | m.setTextColor(colors.white) | |
23 | m.setCursorPos(1,2) | |
24 | m.write(fa[c+1]) | |
25 | m.setCursorPos(1,3) | |
26 | m.write(fa[c+2]) | |
27 | m.setCursorPos(1,4) | |
28 | m.write(fa[c+3]) | |
29 | m.setCursorPos(1,5) | |
30 | m.write(fa[c+4]) | |
31 | event, button, x, y = os.pullEvent("monitor_touch") | |
32 | m.clear() | |
33 | m.setCursorPos(1,1) | |
34 | if y==fa[c+5]+1 then | |
35 | m.write("Richtig") | |
36 | else | |
37 | m.write("Falsch") | |
38 | end | |
39 | sleep(1) | |
40 | end |