Sirshark10

Compat

Jun 13th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. oldYield = _G.coroutine.yield
  2. _G.coroutine.yield = function(str)
  3.   local dat = {oldYield(str)}
  4.   if str == "mouse_click" then
  5.     dat[3] = dat[3]-9
  6.     dat[4] = dat[4]-3
  7.   end
  8.   return table.unpack(dat)
  9. end
  10.  
  11. term.setBackgroundColor(colors.gray)
  12. term.clear()
  13. term.setCursorPos(1,1)
  14. print("Compat Layer for Increased Screen Res")
  15. x,y = term.getSize()
  16. y2 = y/2
  17. y2 = y2-9
  18.  
  19. x2 =  x/2
  20. x2 = x2-25
  21. myWin = window.create(term.current(),x2,y2,51,19,true)
  22. term.redirect(myWin)
  23. os.run({},"/rom/programs/shell")
Add Comment
Please, Sign In to add comment