Stolar228

ScreenEmu.lua

Apr 17th, 2018
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local term = require("term")
  2. local component = require("component")
  3. local gpu = component.gpu
  4. local lvl
  5. term.clear()
  6. print("введите уровень экрана")
  7. print("для эмуляции")
  8. print("1)50x16")
  9. print("2)80x25")
  10. print("3)160x50")
  11. lvl = io.read()
  12. if lvl == "1" then
  13. term.clear()
  14. gpu.setResolution(50, 16)
  15. elseif lvl == "2" then
  16. term.clear()
  17. gpu.setResolution(80, 25)
  18. elseif lvl == "3" then
  19. term.clear()
  20. gpu.setResolution(160, 50)
  21. else
  22. print("error")
  23. os.sleep(1)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment