Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --basic helper functions
- if fs.exists("GoldSlideDir") == false then
- fs.makeDir("GoldSlideDir")
- end
- function clear(display)
- if display == nil then
- term.clear()
- term.setCursorPos(1,1)
- else
- screen = {}
- screen = display
- screen.clear()
- screen.setCursorPos(1,1)
- end
- end
- color = {
- 1,
- 2,
- 8,
- 16,
- 256,
- 2048,
- 4096,
- 8192,
- 32768,
- 16384
- }
- --click areas
- menuBarBack = {
- {2,3,4,5,6,7},
- {1}
- }
- menuBarAdd = {
- {9,10,11,12,13},
- {1}
- }
- menuBarBGColor = {
- {15,16,17,18,19,20,21,22,23,24},
- {1}
- }
- menuBarNewSlide = {
- {26,27,28,29,30,31,32,33,34,35,36},
- {1}
- }
- boxChangeWidth = {
- {51},
- {1}
- }
- boxChangeHeight = {
- {51},
- {2}
- }
- boxDelete = {
- {51},
- {3}
- }
- addBarBox = {
- {2,3,4,5,6,7,8},
- {2}
- }
- addBarText = {
- {10,11,12,13,14,15,16,17},
- {2}
- }
- menuNew = {
- {10,11,12,13,14,15,16,17,18,19,20,21,22},
- {13,14,15}
- }
- menuOpen = {
- {10,11,12,13,14,15,16,17,18,19,20,21,22,23},
- {17,18,19}
- }
- menuDelete = {
- {25,26,27,28,29,30,31,33,34,35,36,37,38,39,40},
- {13,14,15}
- }
- menuShow = {
- {25,26,27,28,29,30,31,32,33,34,35,36,37,38},
- {17,18,19}
- }
- function checkClickArea(x,y,a)
- area = {}
- area = a
- xFound = false
- yFound = false
- for i,v in ipairs(area[1]) do
- if v == x then
- xFound = true
- end
- end
- for i,v in ipairs(area[2]) do
- if v == y then
- yFound = true
- end
- end
- if xFound and yFound then
- return true
- else
- return false
- end
- end
- function split(str, pattern)
- local t = { }
- local fpat = "(.-)" .. pattern
- local last_end = 1
- local s, e, cap = str:find(fpat, 1)
- while s do
- if s ~= 1 or cap ~= "" then
- table.insert(t,cap)
- end
- last_end = e+1
- s, e, cap = str:find(fpat, last_end)
- end
- if last_end <= #str then
- cap = str:sub(last_end)
- table.insert(t, cap)
- end
- return t
- end
- function aPrint(x,y,text,display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- nText = split(text, "/n")
- y = y - 1
- for i,v in ipairs(nText) do
- screen.setCursorPos(x, y + i)
- screen.write(v)
- end
- end
- --element functions
- function drawBox(x,y,w,h,color,display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- screen.setBackgroundColor(color)
- i = 0
- while i < w do
- i2 = 0
- while i2 < h do
- screen.setCursorPos(x + i, y + i2)
- screen.write(" ")
- i2 = i2 + 1
- end
- i = i + 1
- end
- screen.setBackgroundColor(colors.black)
- end
- function findClickArea(x,y,w,h)
- xs = {}
- ys = {}
- i = 0
- while i < w do
- table.insert(xs, x + i)
- i = i + 1
- end
- i = 0
- while i < h do
- table.insert(ys, y + i)
- i = i + 1
- end
- return {xs, ys}
- end
- function drawText(x,y,text, bColor, tColor, display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- screen.setBackgroundColor(bColor)
- screen.setTextColor(tColor)
- aPrint(x,y,text,screen)
- screen.setBackgroundColor(colors.black)
- screen.setTextColor(colors.white)
- end
- function findClickAreaTextBox(x,y,text)
- ys = {y}
- xs = {}
- maxLen = 0
- i = 0
- while i < string.len(text) do
- table.insert(xs, x + i)
- i = i + 1
- end
- return {xs, ys}
- end
- function textClickArea(x,y,element)
- text = element[4][1]
- xPos = element[2][1]
- yPos = element[2][2] - 1
- array = {}
- nText = split(text, "/n")
- found = false
- for i,v in ipairs(nText) do
- table.insert(array, findClickAreaTextBox(xPos,yPos + i,v))
- end
- for i,v in ipairs(array) do
- if checkClickArea(x,y,v) then
- found = true
- end
- end
- return found
- end
- --Drawing functions
- function drawMenuBar(display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- screen.setBackgroundColor(colors.yellow)
- screen.setTextColor(colors.black)
- screen.setCursorPos(1,1)
- screen.write("| Back | Add | BG Color | New Slide |")
- screen.setTextColor(colors.white)
- screen.setBackgroundColor(colors.black)
- end
- function drawColorPicker(display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- for i,v in ipairs(color) do
- screen.setCursorPos(50,i)
- screen.setBackgroundColor(v)
- screen.write(".")
- end
- end
- function drawElementButtons(element, picker, display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- screen.setBackgroundColor(colors.yellow)
- screen.setCursorPos(51,1)
- screen.write("X")
- if element == "box" then
- screen.setCursorPos(51,2)
- screen.write("C")
- elseif element == "textBox" then
- screen.setCursorPos(51,2)
- screen.setBackgroundColor(colors.yellow)
- screen.write("C")
- screen.setCursorPos(51,3)
- screen.write("T")
- end
- screen.setTextColor(colors.white)
- screen.setBackgroundColor(colors.black)
- end
- function drawFrame(num,element, display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- drawMenuBar(screen)
- if element ~= nil then
- drawElementButtons(element, screen)
- end
- screen.setCursorPos(1,19)
- screen.write(num)
- end
- function drawAddType(display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- screen.setCursorPos(1,2)
- screen.write("| Box | Text |")
- end
- --draw main menu
- function drawMain()
- term.setBackgroundColor(colors.blue)
- clear()
- --"G"
- drawBox(15,3,7,1,colors.yellow)
- drawBox(15,4,1,7,colors.yellow)
- drawBox(15,11,10,1,colors.yellow)
- drawBox(25,8,1,4,colors.yellow)
- drawBox(20,8,6,1,colors.yellow)
- --"S"
- drawBox(27,3,7,1,colors.yellow)
- drawBox(27,4,1,3,colors.yellow)
- drawBox(27,7,7,1,colors.yellow)
- drawBox(33,8,1,4,colors.yellow)
- drawBox(27,11,7,1,colors.yellow)
- --"New Project"
- drawBox(10,13,13,3,colors.red)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.black)
- term.setCursorPos(11,14)
- term.write("New Project")
- --"Open Project"
- drawBox(10,17,14,3,colors.red)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.black)
- term.setCursorPos(11,18)
- term.write("Open Project")
- --"Delete Project"
- drawBox(25,13,16,3,colors.red)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.black)
- term.setCursorPos(26,14)
- term.write("Delete Project")
- --"Show Project"
- drawBox(25,17,14,3,colors.red)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.black)
- term.setCursorPos(26,18)
- term.write("Show Project")
- end
- --draw slide functions
- function drawSlideInitial(project, slide, display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- allElementsOnScreen = {}
- clear(screen)
- slideFolder = "GoldSlideDir/"..project.."/slide-"..slide.."/"
- shell.run(slideFolder.."id")
- shell.run(slideFolder.."bgcolor")
- screen.setBackgroundColor(bgColor)
- clear(screen)
- elementsFolder = slideFolder.."elements/"
- allElements = fs.list(elementsFolder)
- for i,v in ipairs(allElements) do
- if v == ".DS_Store" then
- table.remove(allElements, i)
- end
- end
- for i,v in ipairs(allElements) do
- file = fs.open(elementsFolder..v.."/element", "r")
- nElement = file.readAll()
- file.close()
- file = fs.open(elementsFolder..v.."/pos","r")
- nPos = file.readAll()
- file.close()
- nPos = textutils.unserialize(nPos)
- file = fs.open(elementsFolder..v.."/params","r") --sets param variable
- nParams = file.readAll()
- file.close()
- print(nParams)
- nParams = textutils.unserialize(nParams)
- area = {}
- --element config
- --{element, pos, area, params}
- --handling the type of element
- if nElement == "box" then
- drawBox(nPos[1],nPos[2],nParams[1],nParams[2],nParams[3],screen)
- area = findClickArea(nPos[1],nPos[2],nParams[1],nParams[2])
- table.insert(allElementsOnScreen, {nElement, nPos, area, nParams})
- elseif nElement == "textBox" then
- drawText(nPos[1],nPos[2],nParams[1],nParams[2],nParams[3],screen)
- area = findClickAreaTextBox(nPos[1], nPos[2], nParams[1])
- table.insert(allElementsOnScreen, {nElement, nPos, area, nParams})
- elseif nElement == "picture" then
- picture = paintutils.loadImage(elementsFolder..v.."/"..params[1])
- paintutils.drawImage(picture, pos[1], pos[2])
- end
- end
- return allElementsOnScreen
- end
- function drawSlide(elem, project, slide, display)
- if display == nil then
- screen = term
- else
- screen = {}
- screen = display
- end
- elements = {}
- elements = elem
- clear(screen)
- slideFolder = "GoldSlideDir/"..project.."/slide-"..slide.."/"
- shell.run(slideFolder.."id")
- shell.run(slideFolder.."bgcolor")
- screen.setBackgroundColor(bgColor)
- clear(screen)
- elementsFolder = slideFolder.."elements/"
- for i,v in ipairs(elements) do
- element = elements[i][1] --sets element variable
- pos = elements[i][2] --sets pos variable
- params = elements[i][4] --sets param variable
- --element config
- --{element, pos, area, params}
- --handling the type of element
- if element == "box" then
- drawBox(pos[1],pos[2],params[1],params[2],params[3], screen)
- elseif element == "textBox" then
- drawText(pos[1],pos[2],params[1],params[2],params[3], screen)
- elseif element == "picture" then
- picture = paintutils.loadImage(elementsFolder..v.."/"..params[1])
- paintutils.drawImage(picture, pos[1], pos[2])
- end
- end
- end
- --save function
- function save(elem, project, slide)
- elements = {}
- elements = elem
- elementsFolder = "GoldSlideDir/"..project.."/slide-"..slide.."/elements/"
- allElements = fs.list(elementsFolder)
- for i,v in ipairs(allElements) do
- fs.delete(elementsFolder..v)
- end
- for i,v in ipairs(elements) do
- fs.makeDir(elementsFolder.."element-"..i)
- file = fs.open(elementsFolder.."element-"..i.."/element", "w")
- file.write(v[1])
- file.close()
- file = fs.open(elementsFolder.."element-"..i.."/pos", "w")
- file.write('{'..v[2][1]..','..v[2][2]..'}')
- file.close()
- if v[1] == "box" then
- file = fs.open(elementsFolder.."element-"..i.."/params", "w")
- file.write('{')
- file.write(v[4][1]..",")
- file.write(v[4][2]..",")
- file.write(v[4][3])
- file.write("}")
- file.close()
- elseif v[1] == "textBox" then
- file = fs.open(elementsFolder.."element-"..i.."/params", "w")
- file.write('{"')
- file.write(v[4][1]..'",')
- file.write(v[4][2]..",")
- file.write(v[4][3])
- file.write("}")
- file.close()
- end
- end
- end
- --create new
- function createNewSlide(projectName,nSlideNum)
- path = "GoldSlideDir/"..projectName.."/slide-"..nSlideNum.."/"
- file = fs.open(path.."id", "w")
- file.write("slideId = "..nSlideNum)
- file.close()
- file = fs.open(path.."bgcolor", "w")
- file.write("bgColor = colors.black")
- file.close()
- path = path.."elements/element-0/"
- file = fs.open(path.."element", "w")
- file.close()
- file = fs.open(path.."pos", "w")
- file.close()
- file = fs.open(path.."params", "w")
- file.close()
- end
- function newProject(name)
- fs.makeDir("GoldSlideDir/"..name.."/")
- createNewSlide(name, 1)
- end
- --flow control
- project = "project-1"
- function editSlide(projectName)
- allSlides = fs.list("GoldSlideDir/"..projectName)
- for i,v in ipairs(allSlides) do
- if v == ".DS_Store" then
- table.remove(allSlides, i)
- end
- end
- clickID = 0
- elements = drawSlideInitial(projectName,1)
- slideCur = 1
- slideMin = 1
- slideMax = table.getn(allSlides)
- while true do
- allSlides = fs.list("GoldSlideDir/"..projectName)
- for i,v in ipairs(allSlides) do
- if v == ".DS_Store" then
- table.remove(allSlides, i)
- end
- end
- slideMax = table.getn(allSlides)
- drawSlide(elements, projectName, slideCur, screen)
- if clickID ~= 0 then
- drawFrame(slideCur, elements[clickID][1], screen)
- else
- drawFrame(slideCur,screen)
- end
- e,p1,p2,p3 = os.pullEvent()
- save(elements, projectName, slideCur)
- if e == "mouse_click" and p1 == 1 or p1 == 2 then
- drag = false
- for i = #elements,1,-1 do
- if elements[i][1] == "textBox" and textClickArea(p2,p3,elements[i]) then
- clickID = i
- newClick = true
- elseif elements[i][1] ~= "textBox" and checkClickArea(p2,p3,elements[i][3]) then
- clickID = i
- newClick = true
- areaX = elements[i][3][1]
- areaY = elements[i][3][2]
- if p2 == areaX[#areaX] and p3 == areaY[#areaY] and elements[i][1] == "box" then
- drag = true
- end
- break
- end
- end
- if p1 == 2 and clickID ~= 0 and elements[clickID][1] == "textBox" then
- term.setCursorBlink(true)
- newLine = false
- while true do
- text = elements[clickID][4][1]
- y = elements[clickID][2][2]
- x = elements[clickID][2][1]
- lines = split(text, "/n")
- nLines = #lines - 1
- if lines[#lines] == nil then
- xDis = 0
- else
- xDis = string.len(lines[#lines])
- end
- if newLine then
- term.setCursorPos(x, nLines + y + 1)
- else
- term.setCursorPos(x + xDis, nLines + y)
- end
- event, param1, param2, param3 = os.pullEvent()
- if event == "char" then
- text = text..param1
- elements[clickID][4][1] = text
- newLine = false
- elseif event == "key" then
- if param1 == 28 then
- text = text.."/n"
- term.setCursorPos(x, nLines + y + 1)
- elements[clickID][4][1] = text
- newLine = true
- elseif param1 == 14 then
- if string.sub(text,-2) == "/n" then
- temp = string.reverse(text)
- temp = string.sub(temp, 3)
- temp = string.reverse(temp)
- else
- temp = string.reverse(text)
- temp = string.sub(temp, 2)
- temp = string.reverse(temp)
- end
- text = temp
- elements[clickID][4][1] = text
- end
- elseif event == "mouse_click" then
- term.setCursorBlink(false)
- break
- end
- drawSlide(elements, projectName, slideCur)
- drawFrame(slideCur)
- end
- elseif newClick then
- newClick = false
- elseif p1 == 1 and clickID ~= 0 and p2 == 51 and p3 == 1 then
- table.remove(elements, clickID)
- clickID = 0
- elseif p1 ==1 and clickID ~= 0 and p2 == 51 and p3 == 2 then
- drawColorPicker()
- event, param1, param2, param3 = os.pullEvent()
- if event == "mouse_click" and param1 == 1 and param2 == 50 and param3 <= table.getn(color) then
- if elements[clickID][1] == "box" then
- elements[clickID][4][3] = color[param3]
- elseif elements[clickID][1] == "textBox" then
- elements[clickID][4][2] = color[param3]
- end
- end
- elseif p1 == 1 and clickID ~= 0 and p2 == 51 and p3 == 3 and elements[clickID][1] == "textBox" then
- drawColorPicker()
- event, param1, param2, param3 = os.pullEvent()
- if event == "mouse_click" and param1 == 1 and param2 == 50 and param3 <= table.getn(color) then
- if elements[clickID][1] == "textBox" then
- elements[clickID][4][3] = color[param3]
- end
- end
- elseif checkClickArea(p2,p3,menuBarAdd) then
- drawAddType()
- e1, p11, p21, p31 = os.pullEvent()
- if e1 == "mouse_click" and p11 == 1 then
- if checkClickArea(p21, p31, addBarBox) then
- table.insert(elements, {"box" , {4,4} , findClickArea(4,4,2,2), {2,2,colors.orange}})
- elseif checkClickArea(p21,p31, addBarText) then
- table.insert(elements, {"textBox", {4,4}, findClickAreaTextBox(4,4,"text"), {"text", colors.white, colors.black}})
- end
- end
- elseif checkClickArea(p2,p3,menuBarBack) then
- clear()
- break
- elseif checkClickArea(p2,p3,menuBarBGColor) then
- drawColorPicker()
- event, param1, param2, param3 = os.pullEvent()
- if event == "mouse_click" and param1 == 1 and param2 == 50 and param3 <= table.getn(color) then
- term.setBackgroundColor(colors.blue)
- file = fs.open("GoldSlideDir/"..projectName.."/slide-"..slideCur.."/bgcolor", "w")
- file.write("bgColor = "..color[param3])
- file.close()
- end
- elseif checkClickArea(p2,p3,menuBarNewSlide) then
- createNewSlide(projectName, #allSlides + 1)
- slideCur = #allSlides + 1
- else
- if clickID ~= 0 then
- clickID = 0
- end
- end
- elseif e == "mouse_drag" and p1 == 1 then
- if clickID ~= 0 and drag == false then
- elements[clickID][2][1] = p2
- elements[clickID][2][2] = p3
- e = elements[clickID]
- if e[1] == "box" then
- elements[clickID][3] = findClickArea(e[2][1], e[2][2], e[4][1], e[4][2])
- elseif e[1] == "textBox" then
- elements[clickID][3] = findClickAreaTextBox(e[2][1], e[2][2], e[4][1])
- end
- elseif clickID ~= 0 and drag == true then
- area = elements[clickID][3]
- params = elements[clickID][4]
- xDis = p2 - area[1][#area[1]]
- yDis = p3 - area[2][#area[2]]
- elements[clickID][4][1] = math.abs(params[1] + xDis)
- elements[clickID][4][2] = math.abs(params[2] + yDis)
- w = elements[clickID][4][1]
- h = elements[clickID][4][2]
- position = elements[clickID][2]
- elements[clickID][3] = findClickArea(position[1], position[2], w, h)
- end
- elseif e == "key" then
- if p1 == 205 then
- if slideCur < #allSlides then
- slideCur = slideCur + 1
- end
- elseif p1 == 203 then
- if slideCur > 1 then
- slideCur = slideCur - 1
- end
- end
- clickID = 0
- elements = drawSlideInitial(projectName, slideCur)
- end
- end
- end
- function drawProjects(allProjects)
- tab = {}
- tab = allProjects
- if tab[1] ~= nil then
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.black)
- clear()
- print("Select an Option")
- x = 3
- y = 3
- areas = {}
- projects = {}
- for i,v in ipairs(tab) do
- if v == ".DS_Store" then
- table.remove(tab, i)
- end
- end
- for i,v in ipairs(tab) do
- if x + string.len(v) + 2 > 49 then
- x = 3
- y = y + 4
- end
- drawBox(x,y,string.len(v) + 2, 3, colors.red)
- term.setCursorPos(x + 1, y + 1)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.white)
- term.write(v)
- table.insert(areas, findClickArea(x,y,string.len(v) + 2, 3))
- if x > 49 then
- x = 3
- y = y + 4
- else
- x = x + string.len(v) + 3
- end
- end
- for i,v in ipairs(tab) do
- table.insert(projects, {v, areas[i]})
- end
- return projects
- else
- return "NOPE"
- end
- end
- function findMonitors()
- mons = {}
- for i,v in ipairs(rs.getSides()) do
- if peripheral.getType(v) == "monitor" then
- table.insert(mons, v)
- end
- end
- return mons
- end
- function slideShow(project, display)
- screen1 = {}
- screen2 = {}
- screen1 = display
- screen2 = term
- slideCur = 1
- allSlides = fs.list("GoldSlideDir/"..project.."/")
- for i,v in ipairs(allSlides) do
- if v == ".DS_Store" then
- table.remove(allSlides, i)
- end
- end
- slideMin = 1
- slideMax = #allSlides
- elements = drawSlideInitial(project, slideCur, screen1)
- elements = drawSlideInitial(project, slideCur, screen2)
- screen.setCursorBlink(false)
- while true do
- clear()
- drawSlide(elements, project, slideCur, screen1)
- drawSlide(elements, project, slideCur, screen2)
- e,p1 = os.pullEvent()
- if e == "key" then
- if p1 == 203 then
- if slideCur > 1 then
- slideCur = slideCur - 1
- end
- elseif p1 == 205 then
- if slideCur < slideMax then
- slideCur = slideCur + 1
- end
- elseif p1 == 14 then
- break
- end
- end
- elements = drawSlideInitial(project, slideCur, screen1)
- elements = drawSlideInitial(project, slideCur, screen2)
- end
- end
- while true do
- drawMain()
- term.setCursorPos(51,1)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.white)
- term.write("X")
- term.setCursorPos(51,2)
- term.setBackgroundColor(colors.yellow)
- term.write("i")
- event, parameter1, parameter2, parameter3 = os.pullEvent()
- term.setBackgroundColor(colors.black)
- if event == "mouse_click" and parameter1 == 1 then
- if checkClickArea(parameter2, parameter3, menuNew) then
- term.setBackgroundColor(colors.black)
- clear()
- print("This part will be better later, I just wanted to add something here temporarily")
- term.write("Enter project name: ")
- name = read()
- newProject(name)
- elseif checkClickArea(parameter2, parameter3, menuOpen) then
- allProjects = fs.list("GoldSlideDir/")
- objects = drawProjects(allProjects)
- if objects ~= "NOPE" then
- e, p1, p2, p3 = os.pullEvent()
- if e == "mouse_click" and p1 == 1 then
- for i,v in ipairs(objects) do
- if checkClickArea(p2,p3,v[2]) then
- editSlide(v[1])
- end
- end
- end
- end
- elseif checkClickArea(parameter2, parameter3, menuShow) then
- allProjects = fs.list("GoldSlideDir/")
- objects = drawProjects(allProjects)
- if objects ~= "NOPE" then
- e, p1, p2, p3 = os.pullEvent()
- if e == "mouse_click" and p1 == 1 then
- for i,v in ipairs(objects) do
- if checkClickArea(p2,p3,v[2]) then
- peripherals = findMonitors()
- objects2 = drawProjects(peripherals)
- term.setBackgroundColor(colors.black)
- if objects2 ~= "NOPE" then
- e2, param1, param2, param3 = os.pullEvent()
- if e2 == "mouse_click" and param1 == 1 then
- for o,k in ipairs(objects2) do
- if checkClickArea(param2,param3,k[2]) then
- slideShow(v[1], peripheral.wrap(k[1]))
- end
- end
- end
- end
- end
- end
- end
- end
- elseif checkClickArea(parameter2, parameter3, menuDelete) then
- allProjects = fs.list("GoldSlideDir/")
- objects = drawProjects(allProjects)
- if objects ~= "NOPE" then
- e, p1, p2, p3 = os.pullEvent()
- if e == "mouse_click" and p1 == 1 then
- for i,v in ipairs(objects) do
- if checkClickArea(p2,p3,v[2]) then
- fs.delete("GoldSlideDir/"..v[1])
- end
- end
- end
- end
- elseif parameter2 == 51 and parameter3 == 1 then
- term.setBackgroundColor(colors.black)
- clear()
- break
- elseif parameter2 == 51 and parameter3 == 2 then
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.black)
- clear()
- print("Thankyou for downloading GoldSlide!")
- print()
- print("To create a project, click new project. Then click open project and select the new project to edit it")
- print()
- print("Keyboard controls to present a slideshow")
- print("----------------------------------------")
- print("Left arrow key - back a slide")
- print()
- print("Right arrow key - forward a slide")
- print()
- print("Backspace - back to main menu")
- print()
- print()
- print()
- print("Press enter")
- read()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment