Arc13

Backup Utility UI

Nov 5th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local monX, monY = term.getSize()
  2.  
  3. local function drawUI(sStepNumber, sText)
  4.   term.clear()
  5.   term.setBackgroundColor(colors.black)
  6.  
  7.   paintutils.drawLine(1, 1, monX, 1, colors.white)
  8.  
  9.   term.setTextColor(colors.black)
  10.   term.setCursorPos(1, 1)
  11.   term.write("arc13's Backup Utility")
  12.  
  13.   term.setBackgroundColor(colors.black)
  14.  
  15.   term.setTextColor(colors.white)
  16.   term.setCursorPos(1, 3)
  17.   term.write("Step "..sStepNumber)
  18.  
  19.   term.setCursorPos(1, 4)
  20.  
  21.   for i = 1, monX do
  22.     write(string.char(131))
  23.   end
  24.  
  25.   term.setCursorPos(1, 5)
  26.   print(sText)
  27. end
  28.  
  29. drawUI("1", "Welcome to the arc13's Backup Utility.\n\nThis wizard will guide you through this utility.\n\nIt is recommended that you eject all disks that may be connected to this computer.\n\nPress any key to continue.")
  30. os.pullEvent("key")
  31.  
  32. drawUI("2", "The wizard will now run the backup utility.\n\nPress any key to continue.\n\n")
  33. os.pullEvent("key")
  34.  
  35. shell.run("pastebin run 20CdUw4b")
  36.  
  37. drawUI("3", "The backup is done.\n\nYou should have a file called \"files.bkp\" in the \"/\" directory, please do a \"pastebin put files.bkp\" after this program finish.\n\nPress any key to continue.")
  38. os.pullEvent("key")
  39.  
  40. drawUI("4", "The backup utility wizard is now finished.\n\nThanks for using me!\n\nPress any key to finish.")
  41. os.pullEvent("key")
  42.  
  43. term.clear()
  44. term.setCursorPos(1, 1)
  45. print("Don't forget to upload to pastebin the \"files.bkp\" file by using \"pastebin put files.bkp\".\n")
Add Comment
Please, Sign In to add comment