Advertisement
minif

about

Jan 23rd, 2020
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. --Minif OS About Tool
  2.  
  3. --Functions and Variables
  4. local function wait()
  5. local event = os.pullEvent("mouse_click")
  6. end
  7.  
  8. local function drawWindow()
  9. paintutils.drawFilledBox(3,3,osScreenSizeX-2,osScreenSizeY-2,colors.white)
  10. paintutils.drawBox(3,3,osScreenSizeX-2,5,colors.lightGray)
  11. term.setBackgroundColor(colors.white)
  12. term.setTextColor(colors.black)
  13. term.setCursorPos(4,4)
  14. term.write("About")
  15. term.setCursorPos(4,7)
  16. if fs.exists("system/info") then
  17. local file = fs.open("system/info","r")
  18. term.write("Version: ")
  19. term.setCursorPos(13,7)
  20. term.write(file.readLine())
  21. term.setCursorPos(4,8)
  22. term.write(file.readLine())
  23. term.setCursorPos(4,9)
  24. term.write(file.readLine())
  25. file.close()
  26. term.setCursorPos(4,osScreenSizeY-3)
  27. term.write("Click to close")
  28. wait()
  29. else
  30. osBSOD("Critical file missing.","/system/info is missing, and is needed to run.","Please re-install this file")
  31. end
  32. end
  33. --Execution
  34.  
  35. drawWindow()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement