Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Minif OS About Tool
- --Functions and Variables
- local function wait()
- local event = os.pullEvent("mouse_click")
- end
- local function drawWindow()
- paintutils.drawFilledBox(3,3,osScreenSizeX-2,osScreenSizeY-2,colors.white)
- paintutils.drawBox(3,3,osScreenSizeX-2,5,colors.lightGray)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(4,4)
- term.write("About")
- term.setCursorPos(4,7)
- if fs.exists("system/info") then
- local file = fs.open("system/info","r")
- term.write("Version: ")
- term.setCursorPos(13,7)
- term.write(file.readLine())
- term.setCursorPos(4,8)
- term.write(file.readLine())
- term.setCursorPos(4,9)
- term.write(file.readLine())
- file.close()
- term.setCursorPos(4,osScreenSizeY-3)
- term.write("Click to close")
- wait()
- else
- osBSOD("Critical file missing.","/system/info is missing, and is needed to run.","Please re-install this file")
- end
- end
- --Execution
- drawWindow()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement