Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Movie Theater Simple Movie Control
- local basalt = require("basalt")
- -- Get the main frame (your window)
- local main = basalt.getMainFrame()
- -- Get the monitor and use as main Frame
- local monitor = peripheral.find("monitor")
- local monitorFrame = basalt.createFrame():setTerm(monitor)
- -- Setup the monitorFrame
- monitorFrame.background = colors.black
- monitorFrame.foreground = colors.white
- -- Add play button
- monitorFrame:addButton()
- :setText("Play")
- :setPosition(1, 4)
- :onClick(function()
- rs.setOutput("right", false)
- end)
- -- Add pause button
- monitorFrame:addButton()
- :setText("Pause")
- :setPosition(1, 1)
- :onClick(function()
- rs.setOutput("right", true)
- end)
- -- Start Basalt
- basalt.run()
Advertisement
Add Comment
Please, Sign In to add comment