Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version = "1.4"
- ----------------------------------------------------------
- -- ~". _^_ "~ -- KrapFile Version 1.4 --
- -- ~" (____) "~ -- Created by TehRockettek --
- -- ~"(______) "~ -- --
- -- " (________) "~ -- KrapFile is a simple file --
- -- (____________) " -- managing program and is --
- -- KRAP SOFTWARE -- a much more optimized --
- -- "Its like someone -- version. This program will --
- -- litteraly made -- have much more features --
- -- this whilst on -- over time! --
- -- the toilet... " -- --
- ----------------------------------------------------------
- -- I sometimes livestream to youtube! --
- -- https://www.youtube.com/channel/UC_WsSgl1UL1USK4K0RplcnQ/live --
- -- Older versions of craftOS dont support the characters used in
- -- KrapFile, if this is so just run -o after the program
- term.setTextColour(colours.white)
- term.setBackgroundColour(colours.black)
- term.clear()
- term.setCursorPos(1,1)
- if shell then
- pgrm = "/" .. shell.getRunningProgram()
- else
- pgrm = "/KrapFile.lua"
- printError("Hmm, cant find shell api.")
- os.pullEvent("key")
- end
- args = { ... }
- if http then
- local pbl = http.get("http://pastebin.com/raw/wscpHypE")
- if not pbl then
- printError("Could not connect to pastebin")
- else
- latestver = string.gsub(pbl.readLine(),"version = ","")
- latestver = string.gsub(latestver,"\"","")
- end
- end
- term.clear()
- terminal = term.current()
- resolution = {term.getSize()}
- dialoguevisible = false
- print("Debug use only")
- if _CC_VERSION then
- ver = string.gsub(_CC_VERSION,"pr","")
- supportspecialchars = (tonumber(ver) >= 1.76)
- print("cc-ver: " .. _CC_VERSION)
- elseif _HOST then
- supportspecialchars = true
- --[[ver = string.gsub(_HOST,"pr","")
- supportspecialchars = (tonumber(ver)) >= 1.76)
- print("host: " .. _HOST)]]
- end
- if not supportspecialchars or args[1] == "-o" then
- back = "<"
- up = "^"
- print("ssc: false")
- else
- back = ""
- up = ""
- print("ssc: true")
- end
- print("kf-ver: " .. version)
- print("pb-ver: " .. latestver)
- print("rpgrm: " .. pgrm)
- sleep(1)
- local function minBytes(bytes)
- if bytes > 1000000 then
- return string.sub(bytes/1000000,1,string.len(math.ceil(bytes/1000000))+2) .. "M"
- elseif bytes > 1000 then
- return string.sub(bytes/1000,1,string.len(math.ceil(bytes/1000))+2) .. "K"
- else
- return bytes .. "B"
- end
- end
- if string.find(pgrm,"pastebin") then -- Detect if using pastebin run (show installer)
- term.clear()
- paintutils.drawFilledBox(1,1,resolution[1],resolution[2],colours.cyan)
- local pastebin = http.get("http://www.pastebin.com/raw/wscpHypE")
- filesize = minBytes(string.len(pastebin.readAll()))
- term.setCursorPos(1,resolution[2])
- term.write("File size: " .. filesize)
- term.setCursorPos((resolution[1]-9)/2,resolution[2]/2)
- term.write("Download!")
- os.pullEvent("mouse_click")
- term.clear()
- paintutils.drawFilledBox(1,1,resolution[1],3,colours.cyan)
- paintutils.drawFilledBox(1,4,resolution[1],resolution[2],colours.white)
- term.setCursorPos(2,2)
- term.setBackgroundColour(colours.cyan)
- term.setTextColour(colours.white)
- textutils.slowPrint("KrapFile installer")
- term.setTextColour(colours.cyan)
- term.setBackgroundColour(colours.white)
- term.setCursorPos(1,5)
- term.write(" Loading...")
- sleep(2)
- local pbl = http.get("http://pastebin.com/raw/wscpHypE")
- if not pbl then
- printError(" Could not connect to pastebin!")
- print(" Error during update!\n Computer will now reboot...")
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- os.reboot()
- end
- latestver = string.gsub(pbl.readLine(),"version = ","")
- latestver = string.gsub(latestver,"\"","")
- pbl.close()
- term.setCursorPos(1,5)
- print(" Latest version: " .. latestver .. "\n Download? (Y/N)")
- term.setCursorPos(2,10)
- local _,id = os.pullEvent("key")
- if id == 21 then
- print("\n Downloading...")
- term.setCursorPos(1,12)
- term.write(" Connecting to pastebin...")
- local pbl = http.get("http://pastebin.com/raw/wscpHypE")
- if pbl then
- print(" Success")
- else
- printError(" Failed")
- print(" Error during update!\n Computer will reboot...")
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- os.reboot()
- end
- print(" Saving to file...")
- if fs.exists("KrapFile") then fs.delete("/KrapFile") end
- krapfile = fs.open("/KrapFile","w")
- krapfile.write(pbl.readAll())
- print(" Finished! Downloaded " .. latestver .. "\n\n Computer will reboot...")
- term.setCursorPos(2,resolution[2])
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- os.reboot()
- else
- print("Returing to Shell...")
- term.setCursorPos(2,resolution[2])
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- term.clear()
- term.setTextColour(colours.white)
- term.setBackgroundColour(colours.black)
- term.setCursorPos(1,1)
- shell.run("shell")
- end
- end
- if resolution[1] < 26 or resolution[2] < 5 then
- printError("Sorry! Your computer must be atleast 26x5 to run this! (" .. resolution[1] .. "x" .. resolution[2] .. ")")
- return
- elseif not colors then
- printError("Sorry! Your computer doesn't seem to support colour. Monochrome support for KrapFile will be released shortly")
- return
- end
- paintutils.drawFilledBox(1,1,resolution[1],resolution[2],colours.cyan)
- term.setCursorPos((resolution[1]-string.len("KrapFile"))/2,(resolution[2]/5)*2)
- term.write("KrapFile")
- term.setCursorPos(1,resolution[2])
- term.write(version)
- term.setCursorPos(resolution[1]-string.len("By TehRockettek")+1,resolution[2])
- term.write("By TehRockettek")
- local comments = {"To continue, enter your SS Number:","Piorjade liking pie is a conspiracy","Enter your credit card details","Free one-time payment of £499","Now with more loading time!","May include nuts","Attempt to index nil","Now in 1080p!","I got molested by a toaster","I am bender, insert girder","May include bugs","This litteraly took 12 hours to make","Im not joking","You pirated free software!","Child Lock is enabled","Have you tried a gun? I have","Screw switchcraft,i want my plot back","Sample comment","Wow, thats so racist","file.flushDownToilet()","I cunt speel properply","What's the wecommended amount of dedotated wam","Subscribe to my YT: Teh Rockettek","Try doing 5x26, It works!","If stuff is showing as ?, run with -o","I have a fetish for keemstar's beard","I play pokemon go","Redirection is a good game","Dan200, more like err... dan smelly hundred","*Air horns*","~You hear the windows xp startup noise~"}
- local fits = {}
- for i=1,#comments,1 do
- if #comments[i] <= resolution[1] then
- table.insert(fits,comments[i])
- end
- end
- if resolution[2] < 10 then
- fits = {"This is small!"}
- end
- local num = math.random(1,#fits)
- term.setCursorPos((resolution[1]-string.len(fits[num]))/2,(resolution[2]/5)*4)
- term.write(fits[num])
- sleep(2)
- term.clear()
- local windows = {}
- windows.HUD = window.create(terminal,1,1,resolution[1],3)
- windows.FILES = window.create(terminal,1,4,resolution[1]-1,resolution[2]-4)
- windows.SCROLLBAR = window.create(terminal,resolution[1],4,resolution[1],resolution[2]-4)
- windows.BOTTOM = window.create(terminal,1,resolution[2],resolution[1],1)
- windows.EXTRA = window.create(terminal,1,1,1,1,false)
- path = "/"
- offset = 0
- local function cut(text,length)
- if string.len(text) > length then
- return string.sub(text,1,length)
- else
- return text
- end
- end
- local function getSize(path)
- local size = fs.getSize(path)
- if fs.isDir(path) then
- local l = fs.list(path)
- for i = 1, #l do
- size = size + getSize(fs.combine(path, l[i]))
- end
- end
- return size
- end
- local function getName(path)
- num = -1
- while not string.find(path,"/",num) do
- num = num - 1
- end
- return string.sub(path,string.find(path,"/",num)+1,#path)
- end
- local function loadHUD()
- term.redirect(windows.HUD)
- paintutils.drawFilledBox(1,1,resolution[1],3,colours.cyan)
- term.setBackgroundColour(colours.cyan)
- if path == "" or not path then path = "/" end
- term.setTextColour(colours.white)
- term.setCursorPos(2,2)
- term.write(back)
- if offset < 0 then offset = 0 end
- term.setTextColour(colours.white)
- term.setCursorPos(5,2)
- term.write(up)
- term.setCursorPos(8,2)
- term.setTextColour(colours.white)
- term.write(cut(path,resolution[1]-8))
- term.redirect(terminal)
- end
- local function loadDETAILS(path)
- fileList = fs.list(path)
- folderSize = 0
- filesinfolder = 0
- foldersinfolder = 0
- for i=1,#fileList,1 do
- local filePath = "/" .. fs.combine(path,fileList[i])
- if fs.isDir(filePath) then foldersinfolder = foldersinfolder + 1 else filesinfolder = filesinfolder + 1 end
- folderSize = folderSize + getSize(filePath)
- end
- end
- local function loadFILES()
- loadDETAILS(path)
- term.redirect(windows.FILES)
- paintutils.drawFilledBox(1,1,resolution[1]-1,resolution[2]-4,colours.white)
- fileList = fs.list(path)
- containerWidth,containerHeight = term.getSize()
- if #fileList-offset == containerHeight then
- for i=1,containerHeight,1 do
- filePath = "/" .. fs.combine(path,fileList[i+offset])
- if fs.isDir(filePath) then
- fileSize = "("..minBytes(getSize(filePath))..")"
- else
- fileSize = minBytes(fs.getSize(filePath))
- end
- if filePath == pgrm then
- paintutils.drawFilledBox(1,i,1,i,colours.green)
- elseif fs.isDir(filePath) then
- paintutils.drawFilledBox(1,i,1,i,colours.yellow)
- elseif fs.isReadOnly(filePath) then
- paintutils.drawFilledBox(1,i,1,i,colours.red)
- else
- paintutils.drawFilledBox(1,i,1,i,colours.blue)
- end
- term.setCursorPos(3,i)
- term.setBackgroundColour(colours.white)
- if string.sub(fileList[i],1,1) == "." then
- term.setTextColour(colours.grey)
- elseif ("/" .. fileList[i+offset] == pgrm) and (tonumber(version) < tonumber(latestver)) then
- term.setTextColour(colours.green)
- else
- term.setTextColour(colours.black)
- end
- term.write(cut(fileList[i+offset],containerWidth-10) .. string.rep(" ",containerWidth - (string.len(cut(fileList[i+offset],containerWidth-10))+2+string.len(fileSize))) .. fileSize)
- end
- elseif #fileList < containerHeight then
- for i=1,#fileList,1 do
- filePath = "/" .. fs.combine(path,fileList[i])
- if fs.isDir(filePath) then
- fileSize = "("..minBytes(getSize(filePath))..")"
- else
- fileSize = minBytes(fs.getSize(filePath))
- end
- if filePath == pgrm then
- paintutils.drawFilledBox(1,i,1,i,colours.green)
- elseif fs.isDir(filePath) then
- paintutils.drawFilledBox(1,i,1,i,colours.yellow)
- elseif fs.isReadOnly(filePath) then
- paintutils.drawFilledBox(1,i,1,i,colours.red)
- else
- paintutils.drawFilledBox(1,i,1,i,colours.blue)
- end
- term.setCursorPos(3,i)
- term.setBackgroundColour(colours.white)
- if string.sub(fileList[i],1,1) == "." then
- term.setTextColour(colours.grey)
- elseif ("/" .. fileList[i] == pgrm) and (tonumber(version) < tonumber(latestver)) then
- term.setTextColour(colours.green)
- else
- term.setTextColour(colours.black)
- end
- term.write(cut(fileList[i],containerWidth-10) .. string.rep(" ",containerWidth - (string.len(cut(fileList[i],containerWidth-10))+2+string.len(fileSize))) .. fileSize)
- end
- else
- for i=1,containerHeight,1 do
- filePath = "/" .. fs.combine(path,fileList[i+offset])
- if fs.isDir(filePath) then
- fileSize = "("..minBytes(getSize(filePath))..")"
- else
- fileSize = minBytes(fs.getSize(filePath))
- end
- if filePath == pgrm then
- paintutils.drawFilledBox(1,i,1,i,colours.green)
- elseif fs.isDir(filePath) then
- paintutils.drawFilledBox(1,i,1,i,colours.yellow)
- elseif fs.isReadOnly(filePath) then
- paintutils.drawFilledBox(1,i,1,i,colours.red)
- else
- paintutils.drawFilledBox(1,i,1,i,colours.blue)
- end
- term.setCursorPos(3,i)
- term.setBackgroundColour(colours.white)
- if string.sub(fileList[i],1,1) == "." then
- term.setTextColour(colours.grey)
- elseif ("/" .. fileList[i+offset] == pgrm) and (tonumber(version) < tonumber(latestver)) then
- term.setTextColour(colours.green)
- else
- term.setTextColour(colours.black)
- end
- term.write(cut(fileList[i+offset],containerWidth-10) .. string.rep(" ",containerWidth - (string.len(cut(fileList[i+offset],containerWidth-10))+2+string.len(fileSize))) .. fileSize)
- end
- end
- term.redirect(terminal)
- end
- local function loadBAR()
- term.redirect(windows.SCROLLBAR)
- local _,containerHeightb = term.getSize()
- if #fileList <= containerHeight then
- paintutils.drawFilledBox(1,1,1,containerHeightb,colours.grey)
- else
- paintutils.drawFilledBox(1,1,1,containerHeightb,colours.lightGrey)
- end
- barryscott = (containerHeightb/100) * ((offset/(#fileList - containerHeight))*100)
- if barryscott < 1 then
- barryscott = 1
- end
- if offset == 0 then
- barryscott = 1
- end
- paintutils.drawFilledBox(1,barryscott,1,barryscott,colours.grey)
- term.redirect(terminal)
- end
- local function loadBOTTOM()
- if not dialoguevisible then
- term.redirect(windows.BOTTOM)
- term.setBackgroundColour(colours.lightGrey)
- term.setTextColour(colours.grey)
- term.clearLine()
- term.setCursorPos(1,1)
- local info = filesinfolder .. " files " .. foldersinfolder .. " folders"
- local posstats = offset .. "/" .. #fileList
- bottombar = info .. string.rep(" ",resolution[1]-string.len(info)-string.len(posstats)) .. posstats
- term.write(bottombar)
- term.redirect(terminal)
- end
- end
- local function loadALL()
- dialoguevisible = false
- loadHUD()
- loadFILES()
- loadBAR()
- loadBOTTOM()
- end
- local function loadDIALOGUE(text)
- term.redirect(windows.BOTTOM)
- term.setBackgroundColour(colours.lightGrey)
- term.setTextColour(colours.grey)
- term.clearLine()
- term.setCursorPos(1,1)
- term.write(text)
- term.redirect(terminal)
- end
- -- INIT
- loadALL()
- -- Hint: Pretty much screwing arround with anything below will pretty much completely break the gui part of it ;)
- -- But to be honest, you shouldnt be screwing arround with the entire program at all...
- -- key,id,false
- -- key_up,id
- -- mouse_click,left(1)/right(2),X,Y
- -- mouse_scroll,down(-1)/up(1),X,Y
- os.pullEvent = os.pullEventRaw -- Just so i can say thanks for using it ;)
- while true do
- if not fs.exists(path) then
- path = "/"
- end
- local a,b,c,d = os.pullEvent()
- if a == "mouse_up" then
- if b == 1 then -- left
- if c < 4 and d < 4 then
- if path ~= "/" then
- path = "/" .. fs.combine(path,"..")
- offset = 0
- loadALL()
- end
- elseif c > 3 and c < 7 and d < 4 then
- if offset > 0 then
- offset = 0
- dialoguevisible = false
- windows.FILES.redraw()
- loadBAR()
- loadFILES()
- loadBOTTOM()
- end
- elseif dialoguevisible and d == resolution[2] then
- if c >= 1 and c <= 7 then
- finished = false
- while finished == false do
- if selectedfileDir == pgrm then
- term.clear()
- paintutils.drawFilledBox(1,1,resolution[1],3,colours.cyan)
- paintutils.drawFilledBox(1,4,resolution[1],resolution[2],colours.white)
- term.redirect(terminal)
- term.setCursorPos(2,2)
- term.setBackgroundColour(colours.cyan)
- term.setTextColour(colours.white)
- textutils.slowPrint("KrapFile updater")
- term.setTextColour(colours.cyan)
- term.setBackgroundColour(colours.white)
- term.setCursorPos(1,5)
- term.write(" Loading...")
- sleep(2)
- local pbl = http.get("http://pastebin.com/raw/wscpHypE")
- if not pbl then
- printError(" Could not connect to pastebin!")
- print(" Error during update!\n Computer will now reboot...")
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- os.reboot()
- end
- latestver = string.gsub(pbl.readLine(),"version = ","")
- latestver = string.gsub(latestver,"\"","")
- pbl.close()
- term.setCursorPos(1,5)
- print(" My version: " .. version)
- print(" New version: " .. latestver .. "\n Update? (Y/N)")
- term.setCursorPos(2,10)
- _,id = os.pullEvent("key")
- if id == 21 then
- if version == latestver then
- print("\n Redownloading...")
- else
- print("\n Downloading...")
- end
- sleep(3)
- term.setCursorPos(1,12)
- term.write(" Connecting to pastebin...")
- local pbl = http.get("http://pastebin.com/raw/wscpHypE")
- if pbl then
- print(" Success")
- else
- printError(" Failed")
- print(" Error during update!\n Computer will reboot...")
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- os.reboot()
- end
- print(" Saving to file...")
- krapfile = fs.open(pgrm,"w")
- krapfile.write(pbl.readAll())
- print(" Finished!\n " .. version .. " => " .. latestver .. "\n\n Computer will reboot...")
- term.setCursorPos(2,resolution[2])
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- os.reboot()
- else
- print("Returing to KrapFile...")
- term.setCursorPos(2,resolution[2])
- textutils.slowPrint(string.rep("*",resolution[1]-2))
- end
- finished = true
- editname = ""
- else
- loadDIALOGUE("Rename to: ")
- term.redirect(windows.BOTTOM)
- term.setCursorPos(12,1)
- editname = io.read()
- if fs.isReadOnly(selectedfileDir) then
- loadDIALOGUE("File is read-only!")
- editname = ""
- sleep(2)
- finished = true
- elseif not fs.exists(fs.combine(selectedfileDir,"..").."/"..editname) or editname == "" then
- finished = true
- else
- loadDIALOGUE("File already exists!")
- sleep(2)
- end
- end
- end
- if editname ~= "" then
- loadDIALOGUE("Working...")
- if fs.move(selectedfileDir,fs.combine(selectedfileDir,"..").."/"..editname) then
- loadDIALOGUE("An error occured!")
- sleep(5)
- end
- end
- loadALL()
- elseif c >= 8 and c <= 14 then
- finished = false
- while finished == false do
- loadDIALOGUE("Copy to: ")
- term.redirect(windows.BOTTOM)
- term.setCursorPos(10,1)
- editname = io.read()
- if fs.isReadOnly(editname) then
- loadDIALOGUE("Directory is read-only!")
- sleep(2)
- elseif not fs.exists(editname) or editname == "" then
- finished = true
- else
- loadDIALOGUE("File already exists!")
- sleep(2)
- end
- end
- if editname ~= "" then
- loadDIALOGUE("Working...")
- fs.copy(selectedfileDir,editname)
- if not fs.exists(editname) then
- loadDIALOGUE("An error occured!")
- sleep(5)
- end
- end
- loadALL()
- elseif c >= 15 and c <= 17 then
- finished = false
- while finished == false do
- loadDIALOGUE("Move to: ")
- term.redirect(windows.BOTTOM)
- term.setCursorPos(12,1)
- editname = io.read()
- if fs.isReadOnly(selectedfileDir) then
- loadDIALOGUE("File is read-only!")
- editname = ""
- sleep(2)
- finished = true
- elseif fs.isReadOnly(editname) then
- loadDIALOGUE("Directory is read-only!")
- sleep(2)
- elseif not fs.exists(editname) or editname == "" then
- finished = true
- else
- loadDIALOGUE("File already exists!")
- sleep(2)
- end
- end
- if editname ~= "" then
- loadDIALOGUE("Working...")
- if fs.move(selectedfileDir,editname) then
- loadDIALOGUE("An error occured!")
- sleep(5)
- end
- end
- loadALL()
- elseif c >= 18 and c <= 26 then
- if selectedfileDir == pgrm then
- loadDIALOGUE("Nope...")
- sleep(2)
- finished = true
- key = 1
- end
- finished = false
- loadDIALOGUE("Are you sure? (Y/N)")
- if fs.isReadOnly(selectedfileDir) then
- finished = true
- loadDIALOGUE("File is read-only!")
- sleep(2)
- end
- while finished == false do
- _,id = os.pullEvent("key")
- if id then
- finished = true
- end
- end
- if id == 21 and not fs.isReadOnly(selectedfileDir) then
- loadDIALOGUE("Working...")
- fs.delete(selectedfileDir)
- if fs.exists(selectedfileDir) then
- loadDIALOGUE("An error occured!")
- sleep(5)
- end
- end
- dialoguevisible = false
- windows.FILES.redraw()
- loadBOTTOM()
- loadFILES()
- end
- elseif c < resolution[1] - 1 and d > 3 and d < resolution[2] then
- if fileList[d - 3 + offset] then
- selectedfileDir = "/" .. fs.combine(path,fileList[d - 3 + offset])
- if fs.isDir(selectedfileDir) then
- path = selectedfileDir
- offset = 0
- loadALL()
- elseif selectedfileDir ~= selectedfileDir then
- dialoguevisible = false
- windows.FILES.redraw()
- loadBOTTOM()
- end
- elseif dialoguevisible then
- dialoguevisible = false
- windows.FILES.redraw()
- loadBOTTOM()
- end
- end
- elseif b == 2 then -- right
- if c < resolution[1] - 1 and d > 3 and d < resolution[2] then
- if selectedfileDir then
- if selectedfileDir == "/" .. fs.combine(path,fileList[d - 3 + offset]) then
- term.setTextColour(colours.white)
- term.setBackgroundColour(colours.black)
- term.clear()
- term.setCursorPos(1,1)
- pcall(loadfile(selectedfileDir))
- loadALL()
- end
- end
- if fileList[d - 3 + offset] then
- windows.FILES.redraw()
- term.setBackgroundColour(colours.white)
- term.setCursorPos(3,d)
- term.setTextColour(colours.blue)
- term.write(fileList[d-3+offset])
- selectedfileDir = "/" .. fs.combine(path,fileList[d - 3 + offset])
- dialoguevisible = true
- local filepercentage = string.sub(tostring((getSize(selectedfileDir)/getSize("/"))*100),1,string.len(math.ceil((getSize(selectedfileDir)/getSize("/"))*100))+2)
- if selectedfileDir == pgrm then
- loadDIALOGUE("Update Copy Move Delete".. string.rep(" ",resolution[1]-1-#filepercentage) .. filepercentage .. "%")
- else
- loadDIALOGUE("Rename Copy Move Delete".. string.rep(" ",resolution[1]-1-#filepercentage) .. filepercentage .. "%")
- end
- end
- end
- end
- elseif a == "mouse_scroll" then
- if b == -1 then -- down
- if offset + containerHeight < #fileList then
- offset = offset + 1
- loadBAR()
- loadFILES()
- loadBOTTOM()
- dialoguevisible = false
- end
- elseif b == 1 then -- up
- if offset > 0 then
- offset = offset - 1
- loadBAR()
- loadFILES()
- loadBOTTOM()
- dialoguevisible = false
- end
- end
- elseif a == "key" then
- if b == 208 then -- down
- if offset + containerHeight < #fileList then
- offset = offset + 1
- loadBAR()
- loadFILES()
- loadBOTTOM()
- dialoguevisible = false
- end
- elseif b == 200 then -- up
- if offset > 0 then
- offset = offset - 1
- loadBAR()
- loadFILES()
- loadBOTTOM()
- dialoguevisible = false
- end
- end
- elseif a == "terminate" then
- term.setCursorPos(1,1)
- term.setTextColour(colours.white)
- term.setBackgroundColour(colours.black)
- term.clear()
- print("Thank you for using KrapFile!\n Please go onto the forums to post any bugs or issues that occured.\nAnd thank you for supporting us!")
- return
- end
- loadBOTTOM()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement