Features:
- Windows work from sizes 4 x 1 and up.
- All native programs are supported. Really, anything should work.
- Resizing of windows is possible, but its up to the running program to update the width and height its using to the new values.
- Maximize and close buttons on windows are operational, but the minimize button doesn't do anything yet.
- Windows are draggable.
- Command line script which allows the running of programs as windows.
- Event registry for windows or a default set of events which all windows recieve (timers, rednet messages, etc.) essential for multitasking.
- Minimizing of windows (kind of; you can't get the back unless you do it through code. Will fix this).
- Developer tools for manipulating windows when their programs are being run as a window.
- Resizing of windows via mouse click/dragging.
Planned features:
- Desktop/taskbar program to manage all running windows.
Screenshots
Github
Installation instructions:
- Create a folder system in the root like the following: /CannonOS/Cannon-OS_V2/src/
- Inside this 'src' folder, you'll need to create three folders: 'Classes', 'Libraries', and 'Programs'.
- From there, you can download each of the files by manually going to GitHub and downloading them, or you can use this script to download a file from the repo:
Spoiler
http://pastebin.com/vs6vcFvF Some indentation got messed up in the following code, sorry :(/>local args = { ... } local function printUsage() print (fs.getName (shell.getRunningProgram()) .. " <path-in-repo> <path-on-computer>") end if #args < 2 then printUsage() return end local pathInRepo = args[1] local pathOnComputer = args[2]local baseRepoUrl = "https://raw.github.com/TrystanCannon/Cannon-OS_V2/master/" local function downloadFileContentsFromRepo (filePathInRepo) local fileInRepoHandle = http.get (baseRepoUrl .. filePathInRepo) if fileInRepoHandle then local fileContents = fileInRepoHandle.readAll() fileInRepoHandle.close() return fileContents end endlocal function saveFile (filePathOnComputer, fileContents) local fileHandle = fs.open (filePathOnComputer, 'w') if fileHandle then fileHandle.write (fileContents) fileHandle.close() return true end return false end local function installFile (filePathInRepo, filePathOnComputer) return saveFile (filePathOnComputer, downloadFileContentsFromRepo (filePathInRepo)) endif installFile (pathInRepo, pathOnComputer) then print ("File successfully installed.") else print ("Installation failed.") end
- Once you've got everything in place, you'll need to run the 'Main' script. After this, you simply need to press F1 to start the command line. Running programs is as simple as typing the name of the program (or alias) followed by the width, height, and any arguments you wanted to start the program with.