Compare commits
21 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
c6762927f4 | |
![]() |
cf3a09bb86 | |
![]() |
47bbcb7c4d | |
![]() |
27f69a0dcd | |
![]() |
4db07f804d | |
![]() |
7164459985 | |
![]() |
9c1c46f9e3 | |
![]() |
0d4f4e49f4 | |
![]() |
84086d8412 | |
![]() |
2e09ab776a | |
![]() |
72c4517cda | |
|
218e439092 | |
|
1fd3d4bd8f | |
|
d7dd3d0c8b | |
|
ab2f0702c2 | |
|
99f92bf052 | |
|
e3a1633f6e | |
|
8d66e421a2 | |
|
882db4a962 | |
![]() |
62c3cc7ebb | |
![]() |
2f58a68f30 |
|
@ -1,4 +1,6 @@
|
|||
# SmartPlay-3
|
||||
# SmartPlay 3 has been terminated. Thank you to all fans of the SmartPlay line.
|
||||
|
||||
# SmartPlay 3
|
||||
SmartPlay 3 is the next generation of Music Players.
|
||||
|
||||
GitHub is the new home of SmartPlay 3. All updates of SP3 will be made here, and a public stable release will be released if we think we should do it.
|
||||
GitHub is the new home of SmartPlay 3. All updates of SP3 will be made here.
|
||||
|
|
28
SP3/Settings
28
SP3/Settings
|
@ -1,28 +0,0 @@
|
|||
function center(y,string)
|
||||
local w,h = term.getSize()
|
||||
local x = (w/2)-(#string/2)
|
||||
term.setCursorPos(x,y)
|
||||
print(string)
|
||||
end
|
||||
|
||||
function render()
|
||||
term.setBackgroundColour(colours.blue)
|
||||
term.setTextColour(colours.white)
|
||||
term.clear()
|
||||
center(2,"System Settings")
|
||||
term.setBackgroundColour(colours.red)
|
||||
center(4," Customise Desktop ")
|
||||
center(6," Modify System Files ")
|
||||
center(8,"When in System Files, type 'exit' to")
|
||||
center(9,"return to Settings.")
|
||||
term.setBackgroundColour(colours.grey)
|
||||
center(14," Click here to quit ")
|
||||
end render()
|
||||
|
||||
while true do
|
||||
local evt, button, x, y = os.pullEvent("mouse_click")
|
||||
if y == 4 then shell.run("edit SP3/Desktop") render()
|
||||
elseif y == 6 then term.clear() term.setCursorPos(1,1) shell.run("shell") render()
|
||||
elseif y == 14 then shell.run("SP3/Desktop")
|
||||
else end
|
||||
end
|
69
SP3/Vinyl
69
SP3/Vinyl
|
@ -1,69 +0,0 @@
|
|||
function center(y,string)
|
||||
local w,h = term.getSize()
|
||||
local x = (w/2)-(#string/2)
|
||||
term.setCursorPos(x,y)
|
||||
print(string)
|
||||
end
|
||||
|
||||
term.setBackgroundColour(colours.grey)
|
||||
term.setTextColour(colours.white)
|
||||
term.clear()
|
||||
term.setBackgroundColour(colours.white)
|
||||
term.setTextColour(colours.blue)
|
||||
term.setCursorPos(1,1)
|
||||
term.clearLine()
|
||||
center(1,"SmartPlay 3")
|
||||
term.setBackgroundColour(colours.grey)
|
||||
term.setTextColour(colours.white)
|
||||
center(8,"Please insert disc.")
|
||||
center(17," Click here to Exit ")
|
||||
|
||||
while true do local evt, button, x, y = os.pullEvent("mouse_click")
|
||||
if y == 17 then shell.run("SP3/Desktop")
|
||||
else
|
||||
function loading() term.clear() end
|
||||
|
||||
while true do if disk.hasAudio("right") then loading()
|
||||
center(7,"Song Title:")
|
||||
disk.playAudio("right")
|
||||
center(9,disk.getAudioTitle("right"))
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
elseif disk.hasAudio("bottom") then term.clear()
|
||||
center(7,"Song Title:")
|
||||
center(8,disk.getAudioTitle("bottom"))
|
||||
disk.playAudio("bottom")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
elseif disk.hasAudio("left") then term.clear()
|
||||
center(7,"Song Title:")
|
||||
center(9,disk.getAudioTitle("left"))
|
||||
disk.playAudio("bottom")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
elseif disk.hasAudio("top") then term.clear()
|
||||
center(7,"Song Title:")
|
||||
term.setCursorPos(19,8)
|
||||
center(9,disk.getAudioTitle("left"))
|
||||
disk.playAudio("top")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
|
||||
function start()
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
end
|
||||
elseif disk.hasAudio("back") then start()
|
||||
center(9,disk.getAudioTitle("back"))
|
||||
disk.playAudio("back")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
elseif disk.hasAudio("front") then start()
|
||||
center(9,disk.getAudioTitle("front"))
|
||||
disk.playAudio("front")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
else end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
print("Hello SmartPlay")
|
|
@ -2,17 +2,30 @@
|
|||
-- Original Idea by Gonow32
|
||||
-- Coded by CathrodeRayTube and Mr_Iron2
|
||||
|
||||
-- Initialise Color Changing
|
||||
if not fs.exists("/.taskcol") then
|
||||
f = fs.open("/.taskcol","w")
|
||||
f.writeLine(colours.grey)
|
||||
f.close()
|
||||
end
|
||||
if not fs.exists("/.vercol") then
|
||||
f = fs.open("/.vercol","w")
|
||||
f.writeLine(colours.black)
|
||||
f.close()
|
||||
end
|
||||
|
||||
f = fs.open("/.taskcol","r")
|
||||
taskcol = tonumber(f.readLine())
|
||||
f.close()
|
||||
f = fs.open("/.vercol","r")
|
||||
vercol = tonumber(f.readLine())
|
||||
f.close()
|
||||
|
||||
-- Functions
|
||||
|
||||
local w, h = term.getSize()
|
||||
|
||||
function center(y,string)
|
||||
local x = (w/2)-(#string/2)
|
||||
term.setCursorPos(x,y)
|
||||
print(string)
|
||||
end
|
||||
|
||||
function drawMenu()
|
||||
local function drawMenu()
|
||||
term.setBackgroundColour(colours.blue)
|
||||
term.setTextColour(colours.black)
|
||||
term.setCursorPos(1,h-1)
|
||||
|
@ -29,11 +42,11 @@ function drawMenu()
|
|||
term.write(" Vinyl ")
|
||||
end
|
||||
|
||||
function drawDesktop()
|
||||
local function drawDesktop()
|
||||
term.setBackgroundColour(colours.white)
|
||||
term.clear()
|
||||
term.setCursorPos(1,19)
|
||||
term.setBackgroundColour(colours.grey)
|
||||
term.setBackgroundColour(taskcol)
|
||||
term.clearLine()
|
||||
term.setCursorPos(1,1)
|
||||
term.clearLine()
|
||||
|
@ -41,12 +54,12 @@ function drawDesktop()
|
|||
center(1,"SmartPlay 3")
|
||||
term.setCursorPos(1,19)
|
||||
term.setBackgroundColour(colours.white)
|
||||
term.setTextColour(colours.black)
|
||||
term.setTextColour(vercol)
|
||||
line1 = "SmartPlay 3 v1"
|
||||
line2 = "Insider Preview"
|
||||
term.setCursorPos(w-#line1,17)
|
||||
line2 = "v1.0"
|
||||
term.setCursorPos(w-#line1+1,17)
|
||||
write(line1)
|
||||
term.setCursorPos(w-#line2,18)
|
||||
term.setCursorPos(w-#line2+1,18)
|
||||
write(line2)
|
||||
term.setCursorPos(1,19)
|
||||
term.setBackgroundColor(colors.green)
|
||||
|
@ -76,6 +89,7 @@ while true do
|
|||
elseif x >= 1 and x <= 8 and y == h - 4 and menu == 1 then
|
||||
shell.run("/SP3/note")
|
||||
menu = 0
|
||||
break
|
||||
elseif x >= 1 and x <= 8 and y == h - 5 and menu == 1 then
|
||||
shell.run("/SP3/Info")
|
||||
elseif x >= 1 and x <= 8 and y == h - 6 and menu == 1 then
|
|
@ -25,7 +25,7 @@ while true do local evt, button, x, y = os.pullEvent("mouse_click")
|
|||
elseif v == "disk" then
|
||||
elseif v == "moarp" then
|
||||
else
|
||||
fs.delete("/"..v)
|
||||
fs.delete("/"..v) -- funride, did you just go full retard? that's basically rm *
|
||||
end
|
||||
end
|
||||
shell.run("cp /disk/.flashUpdate/* /")
|
|
@ -0,0 +1,61 @@
|
|||
local function render()
|
||||
term.setBackgroundColour(colours.blue)
|
||||
term.setTextColour(colours.white)
|
||||
term.clear()
|
||||
center(2,"System Settings")
|
||||
term.setBackgroundColour(colours.red)
|
||||
center(4," Customise Desktop ")
|
||||
center(6," Modify System Files ")
|
||||
center(8,"When in System Files, type 'exit' to")
|
||||
center(9,"return to Settings.")
|
||||
term.setBackgroundColour(colours.grey)
|
||||
center(14," Click here to quit ")
|
||||
end
|
||||
render()
|
||||
|
||||
local function deskrender()
|
||||
term.setBackgroundColor(colors.blue)
|
||||
term.setTextColor(colors.white)
|
||||
term.clear()
|
||||
center(2,"Desktop Settings")
|
||||
term.setBackgroundColor(colors.red)
|
||||
center(4," Taskbar Colour ")
|
||||
center(6," Version Text Colour")
|
||||
term.setBackgroundColor(colors.gray)
|
||||
center(14," Click here to go back. ")
|
||||
end
|
||||
|
||||
while true do
|
||||
local evt, button, x, y = os.pullEvent("mouse_click")
|
||||
if y == 4 then
|
||||
deskrender()
|
||||
a = 1
|
||||
while a == 1 do
|
||||
ev = {os.pullEvent("mouse_click")}
|
||||
if ev[4] == 4 then
|
||||
term.clear()
|
||||
term.setCursorPos(1,1)
|
||||
write("New colour: ")
|
||||
color = read()
|
||||
--f = fs.open("/.taskcol","w")
|
||||
--a = "" BugFix #1: Oh no, I overwrote the while loop lock.
|
||||
local f = fs.open(".taskcol", "w")
|
||||
f.write(colours[color] or colors[color]) -- do not care
|
||||
f.close()
|
||||
elseif ev[4] == 6 then
|
||||
term.clear()
|
||||
term.setCursorPos(1,1)
|
||||
write("New colour: ")
|
||||
color = read()
|
||||
local f = fs.open(".vercol", "w")
|
||||
f.write(colours[color] or colors[color]) -- do not care
|
||||
f.close()
|
||||
elseif ev[4] == 14 then
|
||||
a = 0
|
||||
end
|
||||
end
|
||||
render()
|
||||
elseif y == 6 then term.clear() term.setCursorPos(1,1) shell.run("shell") render()
|
||||
elseif y == 14 then shell.run("SP3/Desktop")
|
||||
else end
|
||||
end
|
|
@ -0,0 +1,76 @@
|
|||
-- GUI
|
||||
|
||||
term.setBackgroundColour(colours.grey)
|
||||
term.setTextColour(colours.white)
|
||||
term.clear()
|
||||
term.setBackgroundColour(colours.white)
|
||||
term.setTextColour(colours.blue)
|
||||
term.setCursorPos(1,1)
|
||||
term.clearLine()
|
||||
center(1,"SmartPlay 3")
|
||||
term.setBackgroundColour(colours.grey)
|
||||
term.setTextColour(colours.white)
|
||||
center(8, "Please insert disc.")
|
||||
--center(9, "If nothing happens, click here.")
|
||||
center(17," Click here to Exit ")
|
||||
|
||||
while true do local evt, button, x, y = os.pullEvent("mouse_click")
|
||||
if y == 17 then shell.run("/SP3/Desktop")
|
||||
else
|
||||
|
||||
while true do
|
||||
|
||||
if disk.hasAudio("right") then
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
disk.playAudio("right")
|
||||
center(9,disk.getAudioTitle("right"))
|
||||
sleep(360) -- todo: better way of working out running time?
|
||||
os.shutdown()
|
||||
|
||||
elseif disk.hasAudio("bottom") then -- todo: proper "if i, v in pairs" solution
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
center(8,disk.getAudioTitle("bottom"))
|
||||
disk.playAudio("bottom")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
|
||||
elseif disk.hasAudio("left") then
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
center(9,disk.getAudioTitle("left"))
|
||||
disk.playAudio("bottom")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
|
||||
elseif disk.hasAudio("top") then
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
term.setCursorPos(19,8)
|
||||
center(9,disk.getAudioTitle("top"))
|
||||
disk.playAudio("top")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
|
||||
elseif disk.hasAudio("back") then
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
center(9,disk.getAudioTitle("back"))
|
||||
disk.playAudio("back")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
|
||||
elseif disk.hasAudio("front") then
|
||||
term.clear()
|
||||
center(7,"Song Title:")
|
||||
center(9,disk.getAudioTitle("front"))
|
||||
disk.playAudio("front")
|
||||
sleep(360)
|
||||
os.shutdown()
|
||||
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -6,10 +6,18 @@ function centerSlow(y,string)
|
|||
textutils.slowPrint(string,27)
|
||||
end
|
||||
|
||||
function center(y,string)
|
||||
local w,h = term.getSize()
|
||||
local x = (w/2)-(#string/2)
|
||||
term.setCursorPos(x,y)
|
||||
print(string)
|
||||
end
|
||||
|
||||
term.setBackgroundColour(colours.grey)
|
||||
term.setTextColour(colours.white)
|
||||
term.clear()
|
||||
centerSlow(3,"Welcome to SmartPlay 3.")
|
||||
sleep(0.25)
|
||||
centerSlow(4,"It's like music to your ears.")
|
||||
sleep(2.911)
|
||||
sleep(2)
|
||||
shell.run("SP3/Desktop")
|
Loading…
Reference in New Issue