Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mu Lambda 165
- -- by MCKerrnel
- --
- -- YouTube: http://www.youtube.com/MCKerrnel
- -- Twitter: @MCKerrnel
- --
- -- This program is the base menu system for
- -- the main computer on my TPPI server LP.
- -- Each menu item will call out to run a
- -- different program. Each program will use
- -- a common set of functions.
- -- Load common libraries.
- os.loadAPI("mlapi")
- os.loadAPI("tppi")
- os.loadAPI("touchpoint")
- -- Define variables.
- -- Menu boxes:
- local touch = touchpoint.new("back")
- touch:add("Progression", nil, 2, 2, 16, 6, colors.blue, colors.lightblue)
- touch:add("Upgrade", upgradeReboot, 56, 14, 70, 18, colors.blue, colors.lightblue)
- -- Upgrade System Files and Reboot
- function upgradeReboot()
- touch:toggleButton("Upgrade")
- mlapi.tp("Downloading & Upgrading...standby.", 19, 17, colors.white, colors.red)
- term.restore()
- print "Updating..."
- shell.run("update")
- os.reboot()
- end
- -- MAINLINE
- while true do
- mlapi.clear()
- touch:draw()
- tppi.title(22, 6)
- -- Detect click and see if it's valid.
- -- If it is, break out of the loop and
- -- run the appropriate code.
- touch:run()
- end
Advertisement
Add Comment
Please, Sign In to add comment