Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --GUI
- slc = 0
- --tde-paint:
- local function painter()
- term.setBackgroundColor(colors.blue)
- term.clear()
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1,1)
- write(" Painter ")
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.blue)
- --program
- print("Choise slot for paint")
- print("1")
- print("2")
- print("3")
- print("4")
- print("5 - desktop image")
- write(">")
- var = read()
- if var == "1" then
- shell.run("paint /tde/paint/1")
- elseif var == "2" then
- shell.run("paint /tde/paint/2")
- elseif var == "3" then
- shell.run("paint /tde/paint/3")
- elseif var == "4" then
- shell.run("paint /tde/paint/4")
- elseif var == "5" then
- shell.run("paint /wallpaper")
- shell.run("tde-desktop")
- else
- painter()
- end
- end
- --tde-redstone:
- tBarC = 8
- tBartC = 1
- local function redsbskg()
- backColor = colors.pink
- term.setBackgroundColor(backColor)
- term.clear()
- end
- function RedGui()
- redsbskg()
- redstonegui = paintutils.loadImage("/tde/redstone.png")
- paintutils.drawImage(redstonegui, 0, 0)
- term.setCursorPos(1, 19)
- write("(C) tima_gt 2013-2014 GNU GPL project ")
- term.setCursorPos(1, 2)
- write("Active redstone")
- term.setCursorPos(1, 15)
- write("DeActive redstone")
- term.setCursorPos(50, 1)
- write("X")
- asd = true
- while asd == true do
- local event, button, X, Y = os.pullEventRaw()
- if slc == 0 then
- if event == "mouse_click" then
- if X >=1 and X <=17 and Y >=3 and Y <=5 and button ==1 then slc = 0
- redstone.setOutput("back", true)
- elseif X >=1 and X <=17 and Y >=14 and Y <=18 and button ==1 then slc = 0
- redstone.setOutput("back", false)
- elseif X ==50 and Y ==1 and button ==1 then slc = 0
- asd = false
- shell.run("tde-desktop")
- else
- RedGui()
- end
- end
- end
- end
- end
- --tde-terminal:
- local function restoretext()
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- term.clear()
- end
- local function tde_terminal()
- term.setBackgroundColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.black)
- write(" Terminal ")
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(1,2)
- write("For exit write exit")
- trues = true
- local xter yter = term.getCursorPos()
- term.setCursorPos(1,3)
- while trues == true do
- if xter == 1 and yter == 1 then
- term.setCursorPos(1, 2)
- end
- write(">")
- command = read()
- if command == "exit" then
- print("Exitting...")
- trues = false
- elseif command == "ls" then
- term.setBackgroundColor(colors.black)
- shell.run(command)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- elseif command == "edit" then
- shell.run("pastebin run vyAZc6tJ")
- else
- shell.run(command)
- sleep(1)
- restoretext()
- end
- end
- end
- --applications app:
- local function app_color()
- backColor = colors.white
- term.setBackgroundColor(backColor)
- term.clear()
- end
- --functions|
- -- V
- local function applicationslist()
- applist = paintutils.loadImage("/tde/program")
- paintutils.drawImage(applist, 2, 2)
- term.setCursorPos(4, 18)
- write(" Back ")
- term.setCursorPos(3, 5)
- write(">_")
- end
- --button-home-touch= [Y1=16 X1=1] [Y1=18 X2=14]
- --terminal-touch= [Y1=1 X1=1] [Y2=5 X2=9]
- --redstone-touch= [Y1=1 X1=11] [Y2=5 X2=20]
- --pictures-touch= [Y1=1 X1=23] [Y2=5 X2=31]
- applicationslist()
- local function whiletruedoapp()
- while true do
- local event, button, X, Y = os.pullEventRaw()
- if slc == 0 then
- if event == "mouse_click" then
- if X >=1 and X <=14 and Y >=16 and Y <=19 and button ==1 then slc = 0
- shell.run("tde-desktop")
- elseif X >=2 and X <=10 and button == 1 and Y >=2 and Y <=5 then slc = 0
- tde_terminal()
- shell.run("tde-desktop")
- term.setTextColor(colors.white)
- shell.run("tde-desktop")
- elseif X >=12 and X <=21 and button == 1 and Y >=2 and Y <=6 then slc = 0
- RedGui()
- shell.run("tde-desktop")
- elseif X >=24 and X <=32 and button == 1 and Y >=2 and Y <=6 then slc = 0
- painter() --painter
- shell.run("tde-desktop")
- --elseif X >=27 and X<=46 and button == 1 and Y >=2 and Y <=7 then slc = 0
- --shell.run("/ccYoutube") not working yet
- shell.run("pastebin run nCN4nL7A")
- elseif X >=2 and X <=14 and Y >=8 and Y <=14 and button == 1 then slc = 0
- shell.run("pastebin run vyAZc6tJ")
- shell.run("tde-desktop")
- else
- applicationslist()
- end
- end
- end
- end
- end
- --tde-desktop
- local function fixtext()
- term.setTextColor(colors.white)
- end
- local function desktop()
- --image fixer
- term.setBackgroundColor(colors.white)
- term.clear()
- --indicators
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1, 1)
- write("[ Menu ] ")
- write(" ")
- --Desktop image
- image = paintutils.loadImage("wallpaper")
- paintutils.drawImage(image, 1, 2)
- term.setCursorPos(1, 1)
- end
- function tmenu()
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1,2)
- print("Applications")
- term.setCursorPos(1,3)
- print(" Shutdown ")
- term.setCursorPos(1,4)
- print(" Restart ")
- term.setCursorPos(1,5)
- print(" Settings ")
- term.setCursorPos(1,6)
- print(" LogOut ")
- end
- fixtext()
- desktop()
- while true do
- local event, button, X, Y = os.pullEventRaw()
- if slc == 0 then
- if event == "mouse_click" then
- if X >=2 and X <=12 and Y==1 and button ==1 then
- slc = 1
- tmenu()
- elseif X>=2 and X <=12 and Y==1 and button ==1 then
- slc = 2
- else
- desktop()
- end
- end
- elseif slc == 1 then
- if X>=1 and X<=12 and Y==2 and button ==1 then slc = 0
- app_color()
- applicationslist()
- whiletruedoapp()
- elseif X >=1 and X <=12 and button == 1 and Y== 3 then slc = 0
- os.shutdown()
- elseif X>=1 and X<=12 and Y==4 and button ==1 then slc = 0
- os.reboot()
- elseif X>=1 and X<=12 and Y==6 and button ==1 then slc = 0
- shell.run("pastebin run CcHLkdUT")
- else
- slc = 0
- desktop()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment