Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Varibles
- version = 1.4
- running = true
- --Images
- bg1 = paintutils.loadImage("bg1")
- bg2 = paintutils.loadImage("bg2")
- bg3 = paintutils.loadImage("bg3")
- bg4 = paintutils.loadImage("bg4") --Background by SargentsteveEr
- _plate = paintutils.loadImage("plate")
- _mtab = paintutils.loadImage("mtab")
- rscon = paintutils.loadImage("rscon")
- _ms = 0
- b2 = 1
- --Functions
- clear = function()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1, 1)
- end
- drawMenu1 = function()
- term.setCursorPos(1, 18)
- term.setBackgroundColor( colors.lime )
- term.setTextColor( colors.white )
- print("Power ")
- term.setCursorPos(1, 17)
- print("BgPick ")
- term.setCursorPos(1, 16)
- print("Programs")
- end
- Naminginput = function()
- term.setBackgroundColor(colors.lightGray)
- term.setTextColor(colors.black)
- paintutils.drawImage(_plate, 1,1)
- term.setCursorPos(18, 8)
- write("Open the file")
- term.setCursorPos(18, 9)
- naminginput = read()
- shell.run("paint", naminginput)
- init()
- end
- bgtab = function()
- term.setBackgroundColor(colors.lightGray)
- term.setTextColor(colors.black)
- paintutils.drawImage(_plate, 1,1)
- term.setCursorPos(18, 8)
- write("Pick Your BG")
- term.setCursorPos(20, 10)
- term.setBackgroundColor(colors.white)
- write("-")
- term.setCursorPos(26, 10)
- write("+")
- end
- mtab = function()
- term.setBackgroundColor(colors.lightGray)
- paintutils.drawImage(_mtab, 1,1)
- term.setCursorPos(34, 4)
- term.setTextColor(colors.blue)
- write("Programs:")
- term.setCursorPos(34, 5)
- term.setTextColor(colors.black)
- write("CC Paint")
- term.setCursorPos(34, 6)
- write("Redset")
- end
- rscontrol = function()
- term.setBackgroundColor(colors.lightGray)
- paintutils.drawImage(rscon, 1,1)
- _rs = 1
- end
- drawTaskBar = function()
- term.setCursorPos(1, 19)
- term.setBackgroundColor( colors.lightBlue )
- term.clearLine()
- term.setCursorPos(1, 19)
- term.setBackgroundColor( colors.lime )
- term.setTextColor( colors.white )
- term.write("Menu ")
- sleep()
- term.setCursorPos(46, 19)
- end
- drawDeskTop = function()
- term.setBackgroundColor(colors.white)
- term.clear()
- term.setCursorPos(1, 1)
- if b2 == 1 then
- paintutils.drawImage(bg1, 1,1)
- elseif b2 == 2 then
- paintutils.drawImage(bg2, 1,1)
- elseif b2 == 3 then
- paintutils.drawImage(bg3, 1,1)
- elseif b2 == 4 then
- paintutils.drawImage(bg4, 1,1)
- end
- end
- stop = function()
- clear()
- running = false
- term.setTextColor( colors.orange )
- os.shutdown()
- end
- runTime = function()
- while running do
- event, button, x, y = os.pullEvent("mouse_click")
- if _ms == 0 and button == 1 and x < 9 and y == 19 then
- drawMenu1()
- _ms = 1
- elseif _ms == 1 and button == 1 and y == 18 and x < 7 then
- stop()
- elseif _ms == 1 and button == 1 and x < 9 and y == 19 then
- init()
- elseif _ms == 1 and button == 1 and x < 9 and y == 17 then
- bgtab()
- elseif _ms == 1 and button == 1 and x == 31 and y == 5 then
- init()
- elseif _ms == 1 and b2 > 1 and button == 1 and x == 20 and y == 10 then
- b2 = b2 - 1
- init()
- elseif _ms == 1 and b2 < 4 and button == 1 and x == 26 and y == 10 then
- b2 = b2 + 1
- init()
- elseif _ms == 1 and button == 1 and x < 9 and y == 16 then
- mtab()
- elseif _ms == 1 and button == 1 and x == 47 and y == 2 then
- init()
- elseif _ms == 1 and button == 1 and x == 45 and y == 5 then
- Naminginput()
- elseif _ms == 1 and button == 1 and x == 45 and y == 6 then
- rscontrol()
- elseif _rs == 1 and button == 1 and x == 14 and y == 2 then
- _rs = 0
- init()
- elseif _rs == 1 and button == 1 and x == 6 and y == 4 then
- rs.setOutput("back", true)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 5 and y == 5 then
- rs.setOutput("left", true)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 7 and y == 5 then
- rs.setOutput("right", true)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 6 and y == 6 then
- rs.setOutput("front", true)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 12 and y == 4 then
- rs.setOutput("back", false)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 11 and y == 5 then
- rs.setOutput("left", false)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 13 and y == 5 then
- rs.setOutput("right", false)
- sleep(1)
- elseif _rs == 1 and button == 1 and x == 12 and y == 6 then
- rs.setOutput("front", false)
- end
- end
- end
- init = function()
- _ms = 0
- drawDeskTop()
- drawTaskBar()
- runTime()
- end
- init()
Add Comment
Please, Sign In to add comment