Advertisement
FoxWorn3365

Musicator MAIN

Feb 8th, 2023 (edited)
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. -- Musicator MAIN
  2. -- Created with <3 by FoxWorn3365
  3.  
  4. -- Initial values
  5. notes = {}
  6. clickAssociation = {}
  7. page = "home"
  8. termx, termy = term.getSize()
  9. notes["do_min"] = "261.64"
  10. notes["re"] = "293.68"
  11. notes["mi"] = "329.64"
  12. notes["fa"] = "349.24"
  13. notes["sol"] = "392.00"
  14. notes["la"] = "440.00"
  15. notes["si"] = "493.92"
  16. notes["do_max"] = "523.28"
  17.  
  18. -- Functions
  19. function reset()
  20. term.setBackgroundColor(colors.white)
  21. term.setTextColor(colors.black)
  22. term.clear()
  23. term.setCursorPos(1, 1)
  24. end
  25.  
  26. function drawHead(text)
  27. term.setTextColor(colors.white)
  28. paintutils.drawLine(1, 1, termx, 1, colors.lightBlue)
  29. local position = (termx - #text)/2
  30. term.setCursorPos(position, 1)
  31. print(text)
  32. normalize()
  33. end
  34.  
  35. function normalize()
  36. term.setBackgroundColor(colors.white)
  37. term.setTextColor(colors.black)
  38. end
  39.  
  40. function
  41. while true do
  42. if page == "home" then
  43. reset()
  44. drawHead("Musicator v1.0 - Make your Music!")
  45. -- notesMenu()
  46. os.pullEvent("mouse_click")
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement