SHOW:
|
|
- or go back to the newest paste.
1 | - | button+ = { |
1 | + | p = peripheral.wrap("right") |
2 | - | "---", |
2 | + | p.clear() |
3 | - | " + ", |
3 | + | button_plus = { |
4 | - | "---" |
4 | + | "---", |
5 | " + ", | |
6 | - | button- = { |
6 | + | "---" |
7 | - | "---", |
7 | + | |
8 | - | " - ", |
8 | + | button_moin = { |
9 | - | "---" |
9 | + | "---", |
10 | " + ", | |
11 | "---" | |
12 | } | |
13 | for k,v in ipairs(button_plus) do | |
14 | p.setCursorPos(4,4 + k) | |
15 | p.write(v) | |
16 | end | |
17 | for k,v in ipairs(button_pmoin) do | |
18 | p.setCursorPos(12,4 + k) | |
19 | p.write(v) | |
20 | end | |
21 | p.setCursorPos(10, 7) | |
22 | p.write(nombre) | |
23 | ||
24 | while true do | |
25 | event, side, xPos, yPos = os.pullEvent("monitor_touch") | |
26 | print("X: "..xPos.."Y:"..yPos) | |
27 | if xPos > 4 and xPOs < 8 and yPos > 4 and yPos < 8 | |
28 | end |