Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local shatter = require("/programs/apis/shatter") -- Load the shatter API
- local mods = peripheral.wrap("back") -- get the modules list
- if not mods.canvas then -- ensure glasses are present
- error("Overlay Glasses required") -- error if they aren't there
- end
- term.clear()
- print("Outputting to Overlay Glasses")
- mods.canvas().clear() -- make sure glasses are cleared
- _G.glasses, handler = shatter(mods.canvas()) -- get the terminal object, and put it in the global scope (for alpha setting [and more!] in the shell)
- parallel.waitForAll(handler, -- put the handler function in parallel
- function()
- term.redirect(glasses) -- redirect to overlay
- glasses.setBackgroundAlpha(0.2) -- set the alpha value of the background to .4, for visibility.
- term.clear() -- apply the alpha value change
- shell.run(--[[{},]] "/programs/.shatterstartup/multishell.lua") -- run multishell
- end,
- function()
- while true do
- os.pullEvent("shatter_resize") -- check for when the glasses get resized
- os.queueEvent("term_resize") -- apply it to the shell terminal
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement