Advertisement
GravityCube

Untitled

Sep 27th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. --SETUP
  2. local barColor = colors.cyan
  3. local barTitle = "Record Player"
  4. local notesInfoText = "&2Piano&1 &3Bass"
  5. --END SETUP
  6.  
  7. os.loadAPI("gcapi")
  8.  
  9. local mon = peripheral.find("monitor")
  10. local max_x, max_y = mon.getSize()
  11.  
  12. local notes = {} --
  13.  
  14. function setupMonitor()
  15. mon.setBackgroundColor(colors.white)
  16. mon.clear()
  17.  
  18. mon.setTextColors(colors.black)
  19. mon.setBackgroundColor(barColor)
  20. for x=1, max_x, 1 do
  21. mon.setCursorPos(x,1)
  22. mon.write(" ")
  23. mon.setCursorPos(x,max_y)
  24. mon.write(" ")
  25. end
  26. mon.setCursorPos(gcapi.getCenter(max_x, barTitle), 1)
  27. mon.write(barTitle)
  28.  
  29. mon.setCursorPos(gcapi.getCenter(max_x, barTitle), 1)
  30. mon.write(barTitle)
  31.  
  32. mon.setCursorPos(gcapi.getCenter(max_x, string.len(notesInfoText)-#string.split(notesInfoText, "&")+1), max_y)
  33. gcapi.customMonitorWrite(mon, notesInfoText)
  34. end
  35.  
  36. function printNotes(tick)
  37.  
  38. end
  39.  
  40. function updateMonitor(tick)
  41.  
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement