View difference between Paste ID: UeMiwt67 and XtFsJYZL
SHOW: | | - or go back to the newest paste.
1
m = peripheral.wrap("left")
2
printed = false
3
4
function Run()
5
  term.redirect(m)
6
  m.setCursorPos(42,2)
7
  print(textutils.formatTime(os.time(), false))
8
  term.restore()
9
	return
10
  end
11
12
 function printStuff() 
13
  if printed ~= true then
14
  term.redirect(m)
15
  m.setBackgroundColor(colors.black)
16
  m.setCursorPos(3,1)
17
  m.setTextScale(1)
18
  m.setTextColor(colors.blue)
19
    textutils.slowPrint("WELCOME", 3)
20
    term.restore()
21
   m.setCursorPos(2.5,3)
22
 --  m.setTextScale(4.4)
23
 m.setTextColor(colors.green)
24
   m.write("GO!")
25
 --  m.setTextScale(3.3)
26
   m.setTextColor(colors.yellow)
27
   m.setCursorPos(7,3)
28
   m.write("or")
29
  -- m.setTextScale(4)
30
   m.setTextColor(colors.red)
31-
  
31+
32
   m.write("NO?")
33-
   --function run()
33+
34
  printed = true
35
  return
36-
    check()
36+
37
function check()
38
        if printed ~= true then
39
      printStuff()
40
      else
41
      Run()
42
      os.sleep(.2)
43
      end
44
   end
45-
     
45+
46-
      function check()
46+
47-
        if printed == false then
47+
48
      event,side, xPos, yPos = os.pullEvent("monitor_touch")
49
     --  m.clear()
50
       print(event .. " => Side: " .. tostring(side) .. ", " ..
51-
      os.sleep(1)
51+
52
      "Y: " .. tostring(yPos))
53
      
54-
--peripheral.call("left", "setTextScale", 3)
54+
      end