View difference between Paste ID: 29Q51Bf2 and KCPvH9KN
SHOW: | | - or go back to the newest paste.
1
local mon = peripheral.find("monitor")
2
mon.setBackgroundColour(colours.black)
3
mon.clear()
4
while true do
5
  mon.setCursorPos(3, 3) 
6
  mon.write("I/O")
7
  event, side, x, y = os.pullEvent ("monitor_touch") 
8-
    mon.setCursorPos(3, 5) 
8+
9-
    mon.write("klik")
9+
      mon.setBackgroundColor(colors.black)
10
      mon.clearLine()
11
      mon.setCursorPos(3, 3)
12-
    if x1 > 2 and x1 < 6 and y1 == 3 then 
12+
      mon.setBackgroundColor(colors.green)
13
      mon.write("I/O")
14
      mon.setCursorPos(3, 5)
15
      mon.setBackgroundColor(colors.black)
16
      mon.write("klik")
17
  end
18
  event, side, x1, y1 = os.pullEvent ("monitor_touch")
19
    if x1 > 2 and x1 < 6 and y1 == 3 then
20
      mon.setBackgroundColor(colors.black)
21
      mon.clearLine()
22
      mon.setCursorPos(3, 3)
23
      mon.write("I/O")
24
      mon.setBackgroundColor(colors.red)
25
    end
26
end