1975 lines
44 KiB
Plaintext
1975 lines
44 KiB
Plaintext
local assets = {
|
|
[ "loadingicon.lua" ] = {
|
|
id = 18,
|
|
content = "local ico = lUtils.asset.load(\"User/Cloud/Images/New_Loading.limg\") -- replace with actual filepath later\
|
|
for t=1,#ico do\
|
|
for l=1,#ico[t] do\
|
|
ico[t][l][2] = string.gsub(ico[t][l][2],\"T\",\"9\")\
|
|
ico[t][l][3] = string.gsub(ico[t][l][3],\"T\",\"9\")\
|
|
end\
|
|
end\
|
|
local frame = 1\
|
|
function render(frame)\
|
|
local f = ico[frame]\
|
|
for l=1,#f do\
|
|
term.setCursorPos(1,l)\
|
|
term.blit(unpack(f[l]))\
|
|
end\
|
|
end\
|
|
while true do\
|
|
render(frame)\
|
|
os.sleep(0.1)\
|
|
frame = frame+1\
|
|
if frame > #ico then\
|
|
frame = 1\
|
|
end\
|
|
end",
|
|
name = "loadingicon.lua",
|
|
},
|
|
[ "license.lua" ] = {
|
|
id = 8,
|
|
content = "local license = http.get(\"https://pastebin.com/raw/ZbDMa42Q\").readAll()\
|
|
local lWin = window.create(term.current(),1,1,term.getSize())\
|
|
local oterm = term.current()\
|
|
local scr = 0 -- scroll\
|
|
local function renderWin()\
|
|
local w,h = term.getSize()\
|
|
lWin.reposition(1,1-scr,w-1,60)\
|
|
term.redirect(lWin)\
|
|
term.setBackgroundColor(colors.white)\
|
|
term.setTextColor(colors.black)\
|
|
term.clear()\
|
|
term.setCursorPos(1,1)\
|
|
print(license)\
|
|
lWin.reposition(1,1-scr,w-1,({term.getCursorPos()})[2])\
|
|
term.redirect(oterm)\
|
|
end\
|
|
\
|
|
local scrDrag\
|
|
local calc\
|
|
\
|
|
local function scrollbar(e)\
|
|
local w,h = term.getSize()\
|
|
term.setBackgroundColor(colors.lightGray)\
|
|
term.setTextColor(colors.gray)\
|
|
for y=1,h do\
|
|
term.setCursorPos(w,y)\
|
|
if y == 1 then\
|
|
term.write(\"\\30\")\
|
|
elseif y == h then\
|
|
term.write(\"\\31\")\
|
|
else\
|
|
term.write(\" \")\
|
|
end\
|
|
end\
|
|
local w1,h1 = lWin.getSize()\
|
|
if h1 > h then\
|
|
local sH = h/h1 * (h-2) -- scrollbar height\
|
|
local sY\
|
|
local sYmax\
|
|
if sH < 1 then\
|
|
sY = 2 + (h-2.333)*(scr/(h1-h))\
|
|
sYmax = 2+(h-2.333)*(h1-h)\
|
|
else\
|
|
sY = 2 + (h-1-sH)*(scr/(h1-h))\
|
|
sYmax = 2+(h-1-sH)*(h1-h)\
|
|
end\
|
|
if e then\
|
|
if e[1] == \"mouse_click\" and e[4] >= sY and e[4] <= sY+(sH-1) then\
|
|
scrDrag = e[4]\
|
|
elseif e[1] == \"mouse_drag\" and scrDrag then\
|
|
local sYnew = sY+(e[4]-scrDrag)\
|
|
calc = sY..\"+(\"..e[4]..\"-\"..scrDrag..\")\"\
|
|
if sYnew <= sYmax then\
|
|
sY = sYnew\
|
|
scrDrag = e[4]\
|
|
--calc = \"(\"..sY..\"/\"..sYmax..\") * (\"..h1..\"-\"..h..\")\"\
|
|
scr = (sY/sYmax) * (h1-h)\
|
|
end\
|
|
elseif e[1] == \"mouse_up\" then\
|
|
scrDrag = nil\
|
|
end\
|
|
term.setCursorPos(1,1)\
|
|
term.setTextColor(colors.red)\
|
|
lUtils.transWrite(\"\")\
|
|
--os.sleep(0.5)\
|
|
end\
|
|
local bg = colors.gray\
|
|
if scrDrag then\
|
|
bg = colors.black\
|
|
end\
|
|
term.setBackgroundColor(bg)\
|
|
for y=sY,sY+(sH-1) do\
|
|
term.setCursorPos(w,y)\
|
|
term.write(\" \")\
|
|
end\
|
|
if sH < 1 then\
|
|
term.setCursorPos(w,math.floor(sY))\
|
|
if math.mod(sY,1) > 0.66 then\
|
|
term.setBackgroundColor(bg)\
|
|
term.setTextColor(colors.lightGray)\
|
|
term.write(\"\\143\")\
|
|
elseif math.mod(sY,1) > 0.33 then\
|
|
term.setBackgroundColor(bg)\
|
|
term.setTextColor(colors.gray)\
|
|
term.write(\"\\140\")\
|
|
else\
|
|
term.setBackgroundColor(colors.lightGray)\
|
|
term.setTextColor(bg)\
|
|
term.write(\"\\131\")\
|
|
end\
|
|
end\
|
|
end\
|
|
end\
|
|
\
|
|
renderWin()\
|
|
scrollbar()\
|
|
while true do\
|
|
local e = {os.pullEvent()}\
|
|
local w,h = term.getSize()\
|
|
if e[1] == \"mouse_scroll\" then\
|
|
--local w,h = term.getSize()\
|
|
local w1,h1 = lWin.getSize()\
|
|
if h1 > h and e[3] >= 1 and e[4] >= 1 and e[3] <= self.x2-(self.x1-1) and e[4] <= self.y2-(self.y1-1) then\
|
|
scr = scr+e[2]\
|
|
--local w,h = term.getSize()\
|
|
--local w1,h1 = lWin.getSize()\
|
|
if scr < 0 then\
|
|
scr = 0\
|
|
elseif scr > h1-h then\
|
|
scr = h1-h\
|
|
end\
|
|
renderWin()\
|
|
scrollbar()\
|
|
elseif h1 <= h and scr ~= 0 then\
|
|
scr = 0\
|
|
renderWin()\
|
|
scrollbar()\
|
|
end\
|
|
elseif e[1] == \"term_resize\" then\
|
|
renderWin()\
|
|
scrollbar()\
|
|
elseif string.find(e[1],\"mouse\") and e[3] == w and enabledcuznowitsdisabled then\
|
|
scrollbar(e)\
|
|
renderWin()\
|
|
term.setCursorPos(1,1)\
|
|
term.setTextColor(colors.red)\
|
|
lUtils.transWrite(tostring(scrDrag)..\", \"..tostring(scr))\
|
|
term.setCursorPos(1,2)\
|
|
lUtils.transWrite(tostring(calc))\
|
|
elseif e[1] == \"mouse_up\" then\
|
|
scrDrag = nil\
|
|
end\
|
|
end",
|
|
name = "license.lua",
|
|
},
|
|
[ "makebig.lua" ] = {
|
|
id = 0,
|
|
content = "function wordwrap(str)\
|
|
local x,y = term.getCursorPos()\
|
|
local tW,tH = term.getSize()\
|
|
for w in str:gmatch(\"%S+\") do\
|
|
local x1,y1 = term.getCursorPos()\
|
|
if x1+(#w*3) >= tW then\
|
|
bigfont.bigPrint(\" \")\
|
|
local x2,y2 = term.getCursorPos()\
|
|
term.setCursorPos(x,y2)\
|
|
end\
|
|
bigfont.bigWrite(w..\" \")\
|
|
end\
|
|
end\
|
|
function self.render()\
|
|
term.setCursorPos(self.x1,self.y1)\
|
|
term.setBackgroundColor(colors.cyan)\
|
|
term.setTextColor(self.txtcolor)\
|
|
wordwrap(self.txt)\
|
|
end",
|
|
name = "makebig.lua",
|
|
},
|
|
[ "licensenext.lua" ] = {
|
|
id = 10,
|
|
content = "local slides = shapescape.getSlides()\
|
|
local s = shapescape.getSlide()\
|
|
if s.var.license and slides.cSlide < #slides then\
|
|
shapescape.setSlide(slides.cSlide+1)\
|
|
end",
|
|
name = "licensenext.lua",
|
|
},
|
|
[ "LevelOS_Minimal.lua" ] = {
|
|
id = 14,
|
|
content = "self.package = {\
|
|
[\"name\"] = \"Minimal\",\
|
|
\"startup.lua\",\
|
|
\"LevelOS/desktop.lua\",\
|
|
\"LevelOS/system.lua\",\
|
|
\"LevelOS/assets/loading.limg\",\
|
|
\"LevelOS/Clock.lua\",\
|
|
\"LevelOS/SystemUI.lua\",\
|
|
\"LevelOS/explorer.lua\",\
|
|
\"LevelOS/settings.lua\",\
|
|
\"LevelOS/Task_Manager.lua\",\
|
|
\"LevelOS/startup/lUtils.lua\",\
|
|
\"LevelOS/startup/MwMRender\",\
|
|
}",
|
|
name = "LevelOS_Minimal.lua",
|
|
},
|
|
[ "Package_Click.lua" ] = {
|
|
id = 12,
|
|
content = "local s = shapescape.getSlide()\
|
|
if s.var.package and s.var.package == self.package then\
|
|
s.var.package = nil\
|
|
else\
|
|
s.var.package = self.package\
|
|
end",
|
|
name = "Package_Click.lua",
|
|
},
|
|
[ "LevelOS_Full.lua" ] = {
|
|
id = 13,
|
|
content = "self.package = {\
|
|
[\"name\"] = \"Full\"\
|
|
}",
|
|
name = "LevelOS_Full.lua",
|
|
},
|
|
[ "checkbox.lua" ] = {
|
|
id = 6,
|
|
content = "local function redraw()\
|
|
\9local bl = {\
|
|
\9 {\
|
|
\9 \"Ÿ\",\
|
|
\9 \"990\",\
|
|
\9 \"009\",\
|
|
\9 },\
|
|
\9 {\
|
|
\9 \"• •\",\
|
|
\9 \"900\",\
|
|
\9 \"099\",\
|
|
\9 },\
|
|
\9 {\
|
|
\9 \"‚ƒ\",\
|
|
\9 \"000\",\
|
|
\9 \"999\",\
|
|
\9 },\
|
|
\9}\
|
|
\9if self.value then\
|
|
\9 bl[2][1] = \"•x•\"\
|
|
\9end\
|
|
\9for t=1,3 do\
|
|
\9\9term.setCursorPos(1,t)\
|
|
\9\9term.blit(unpack(bl[t]))\
|
|
\9end\
|
|
end\
|
|
while true do\
|
|
\9os.pullEvent()\
|
|
\9redraw()\
|
|
end",
|
|
name = "checkbox.lua",
|
|
},
|
|
license_checkbox = {
|
|
id = 7,
|
|
content = "self.value = not self.value\
|
|
shapescape.getSlide().var.license = self.value",
|
|
name = "license_checkbox",
|
|
},
|
|
[ "installer.lua" ] = {
|
|
id = 20,
|
|
content = "local function dothething()\
|
|
local function wordwrap(str)\
|
|
local x,y = term.getCursorPos()\
|
|
local tW,tH = term.getSize()\
|
|
for w in str:gmatch(\"%S+\") do\
|
|
local x1,y1 = term.getCursorPos()\
|
|
if x1+(#w*3) >= tW then\
|
|
bigfont.bigPrint(\" \")\
|
|
local x2,y2 = term.getCursorPos()\
|
|
term.setCursorPos(x,y2)\
|
|
end\
|
|
bigfont.bigWrite(w..\" \")\
|
|
end\
|
|
end\
|
|
--local ico = lUtils.asset.load(\"User/Cloud/Images/New_Loading.limg\") -- replace with actual filepath later\
|
|
local f = http.post(\"https://os.leveloper.cc/sGet.php\",\"path=\"..textutils.urlEncode(\"LevelOS/assets/loading.limg\")..\"&code=\"..textutils.urlEncode(\"lSlb8kZq\"),nil).readAll()\
|
|
local ico = textutils.unserialize(f)\
|
|
for t=1,#ico do\
|
|
for l=1,#ico[t] do\
|
|
ico[t][l][2] = string.gsub(ico[t][l][2],\"T\",\"9\")\
|
|
ico[t][l][3] = string.gsub(ico[t][l][3],\"T\",\"9\")\
|
|
end\
|
|
end\
|
|
local frame = 1\
|
|
local prog = 0\
|
|
local icoX,icoY\
|
|
local function renderIco(frame)\
|
|
local f = ico[frame]\
|
|
for l=1,#f do\
|
|
term.setCursorPos(icoX,icoY+(l-1))\
|
|
term.blit(unpack(f[l]))\
|
|
end\
|
|
end\
|
|
local function progress()\
|
|
while true do\
|
|
renderIco(frame)\
|
|
term.setCursorPos(icoX+5,icoY+1)\
|
|
term.write(math.floor(prog + 0.5)..\"% complete\")\
|
|
if badConn then\
|
|
\9 \9term.setCursorPos(x, icoY+5)\
|
|
\9 \9print(\"Having trouble connecting, please hang on...\")\
|
|
\9 end\
|
|
os.sleep(0.1)\
|
|
frame = frame+1\
|
|
if frame > #ico then\
|
|
frame = 1\
|
|
end\
|
|
end\
|
|
end\
|
|
\
|
|
\
|
|
local function fread(file)\
|
|
local f = fs.open(file,\"r\")\
|
|
local o = f.readAll()\
|
|
f.close()\
|
|
return o\
|
|
end\
|
|
\
|
|
local function fwrite(file,content)\
|
|
local f = fs.open(file,\"w\")\
|
|
f.write(content)\
|
|
f.close()\
|
|
return true\
|
|
end\
|
|
\
|
|
\
|
|
local badConn = false\
|
|
local function render()\
|
|
term.setBackgroundColor(colors.cyan)\
|
|
term.setTextColor(colors.white)\
|
|
term.clear()\
|
|
local w,h = term.getSize()\
|
|
local x = 2\
|
|
if w > 51 then\
|
|
x = math.floor(x+((w-51)/4))\
|
|
end\
|
|
term.setCursorPos(x,3)\
|
|
wordwrap(\"Installing LevelOS\")\
|
|
bigfont.bigPrint(\" \")\
|
|
local x1,y1 = term.getCursorPos()\
|
|
term.setCursorPos(x,y1+2)\
|
|
print(\"This might take a while. Don't turn off your computer.\")\
|
|
local x1,y1 = term.getCursorPos()\
|
|
icoX,icoY = x,y1+1\
|
|
-- perhaps a cancel button if i ever feel like it\
|
|
end\
|
|
render()\
|
|
local function events()\
|
|
while true do\
|
|
local e = {os.pullEvent()}\
|
|
-- process things if buttons\
|
|
if e[1] == \"term_resize\" then\
|
|
render()\
|
|
end\
|
|
end\
|
|
end\
|
|
\
|
|
local hpost = function(...)\
|
|
\9while true do\
|
|
\9\9local ret = table.pack(http.post(...))\
|
|
\9\9if not ret[1] then\
|
|
\9\9\9badConn = true\
|
|
\9\9\9render()\
|
|
\9\9\9os.sleep(0.5)\
|
|
\9\9else\
|
|
\9\9\9badConn = false\
|
|
\9\9\9return table.unpack(ret, 1, ret.n)\
|
|
\9\9end\
|
|
\9end\
|
|
end\
|
|
\
|
|
local function getField(thing,fieldname)\
|
|
if string.find(thing,\"<\"..fieldname..\">\",1,true) ~= nil and string.find(thing,\"</\"..fieldname..\">\",1,true) ~= nil then\
|
|
begin = nil\
|
|
ending = nil\
|
|
trash,begin = string.find(thing,\"<\"..fieldname..\">\",1,true)\
|
|
ending,ending2 = string.find(thing,\"</\"..fieldname..\">\",begin+1,true)\
|
|
if begin ~= nil and ending ~= nil then\
|
|
return string.sub(thing,begin+1,ending-1),string.sub(thing,1,trash-1)..string.sub(thing,ending2+1,string.len(thing))\
|
|
end\
|
|
end\
|
|
return nil\
|
|
end\
|
|
\
|
|
local function download(pth)\
|
|
local f = hpost(\"https://os.leveloper.cc/sGet.php\",\"path=\"..textutils.urlEncode(pth)..\"&code=\"..textutils.urlEncode(\"lSlb8kZq\"),{Cookie=userID}).readAll()\
|
|
if f ~= \"409\" and f ~= \"403\" and f ~= \"401\" then\
|
|
fwrite(pth,f)\
|
|
return true\
|
|
else\
|
|
return false\
|
|
end\
|
|
end\
|
|
\
|
|
local function downloader()\
|
|
local package = shapescape.getSlides().package\
|
|
\
|
|
local tFiles = 0\
|
|
local pack = package.name\
|
|
if fs.exists(\"LevelOS/data/settings.lconf\") then\
|
|
local set = textutils.unserialize(fread(\"LevelOS/data/settings.lconf\"))\
|
|
if set.package then\
|
|
pack = set.package\
|
|
end\
|
|
end\
|
|
\
|
|
local tree = {}\
|
|
local folders = {}\
|
|
local function searchFolder(folder)\
|
|
--print(\"Searching folder root/\"..folder)\
|
|
local f = hpost(\"https://os.leveloper.cc/sGet.php\",\"path=\"..textutils.urlEncode(folder)..\"&code=\"..textutils.urlEncode(\"lSlb8kZq\"),nil).readAll()\
|
|
--print(f)\
|
|
local f2 = f\
|
|
while true do\
|
|
local file = nil\
|
|
file,f = getField(f,\"file\")\
|
|
if not file then\
|
|
break\
|
|
else\
|
|
local name = getField(file,\"name\")\
|
|
local timestamp = getField(file,\"timestamp\")\
|
|
timestamp = tonumber(timestamp)\
|
|
if pack == \"Full\" or fs.exists(fs.combine(folder,name)) then\
|
|
tree[fs.combine(folder,name)] = {timestamp=timestamp}\
|
|
tFiles = tFiles+1\
|
|
end\
|
|
--print(\"Found \"..fs.combine(folder,name))\
|
|
end\
|
|
end\
|
|
f = f2\
|
|
while true do\
|
|
local file = nil\
|
|
file,f = getField(f,\"folder\")\
|
|
if not file then\
|
|
break\
|
|
else\
|
|
local name = getField(file,\"name\")\
|
|
if not fs.exists(fs.combine(folder,name)) then\
|
|
fs.makeDir(fs.combine(folder,name))\
|
|
end\
|
|
folders[fs.combine(folder,name)] = \"\"\
|
|
searchFolder(fs.combine(folder,name))\
|
|
end\
|
|
end\
|
|
return true\
|
|
end\
|
|
\
|
|
if not searchFolder(\"\") then return false end\
|
|
\
|
|
if pack == \"Full\" then\
|
|
for k,v in pairs(tree) do\
|
|
table.insert(package,k)\
|
|
end\
|
|
end\
|
|
\
|
|
-- check if name is full, if it is then first list the dir then add all the files to the package\
|
|
for p=1,#package do\
|
|
prog = ((p-1)/#package)*100\
|
|
download(package[p])\
|
|
prog = ((p)/#package)*100\
|
|
end\
|
|
local temp = hpost(\"https://os.leveloper.cc/sGet.php\",\"path=\"..textutils.urlEncode(\"\")..\"&code=\"..textutils.urlEncode(\"lSlb8kZq\"),{Cookie=userID}).readAll()\
|
|
local ver = getField(temp,\"version\")\
|
|
fwrite(\"LevelOS/data/version.txt\",ver)\
|
|
fwrite(\"LevelOS/data/settings.lconf\",textutils.serialize({package=pack}))\
|
|
os.sleep(2)\
|
|
os.reboot()\
|
|
end\
|
|
parallel.waitForAny(events,progress,downloader)\
|
|
end\
|
|
local ok,err = pcall(dothething)\
|
|
if not ok then\
|
|
term.setCursorPos(1,1)\
|
|
term.setTextColor(colors.red)\
|
|
term.write(err)\
|
|
end",
|
|
name = "installer.lua",
|
|
},
|
|
changecolor = {
|
|
id = 1,
|
|
content = "term.setPaletteColor(colors.cyan,26/255,6/255,85/255)\
|
|
local s = shapescape.getSlide()\
|
|
if not s.var then\
|
|
s.var = {}\
|
|
end",
|
|
name = "changecolor",
|
|
},
|
|
[ "next.lua" ] = {
|
|
id = 3,
|
|
content = "local slides = shapescape.getSlides()\
|
|
if slides.cSlide < #slides then\
|
|
shapescape.setSlide(slides.cSlide+1)\
|
|
end",
|
|
name = "next.lua",
|
|
},
|
|
[ "LevelOS_Custom.lua" ] = {
|
|
id = 15,
|
|
content = "self.package = {\
|
|
[\"name\"] = \"Custom\",\
|
|
}",
|
|
name = "LevelOS_Custom.lua",
|
|
},
|
|
[ "back.lua" ] = {
|
|
id = 5,
|
|
content = "local slides = shapescape.getSlides()\
|
|
if self.txt == \" Back\" and slides.cSlide > 1 then\
|
|
shapescape.setSlide(slides.cSlide-1)\
|
|
else\
|
|
a = {lUtils.popup(\"LevelOS Setup\",\"Are you sure you want to exit the LevelOS installer?\",27,9,{\"Cancel\",\"Confirm\"})}\
|
|
if a[1] and a[3] == \"Confirm\" then\
|
|
term.setBackgroundColor(colors.black)\
|
|
term.clear()\
|
|
term.setCursorPos(1,1)\
|
|
shapescape.exit()\
|
|
end\
|
|
end",
|
|
name = "back.lua",
|
|
},
|
|
[ "Package_Update.lua" ] = {
|
|
id = 11,
|
|
content = "local s = shapescape.getSlide()\
|
|
if s.var.package == self.package then\
|
|
self.border.color = colors.blue\
|
|
else\
|
|
self.border.color = colors.cyan\
|
|
end",
|
|
name = "Package_Update.lua",
|
|
},
|
|
packagenextclicky = {
|
|
id = 16,
|
|
content = "local s = shapescape.getSlide()\
|
|
if not s.var then\
|
|
s.var = {}\
|
|
end\
|
|
while true do\
|
|
local e = {os.pullEvent()}\
|
|
if s.var.package then\
|
|
self.border.color = colors.blue\
|
|
self.txtcolor = colors.black\
|
|
if e[1] == \"mouse_click\" and e[3] >= self.x1 and e[4] >= self.y1 and e[3] <= self.x2 and e[4] <= self.y2 then\
|
|
self.oldcolor = self.color\
|
|
self.color = self.border.color\
|
|
elseif e[1] == \"mouse_up\" and self.oldcolor then\
|
|
self.color = self.oldcolor\
|
|
self.oldcolor = nil\
|
|
end\
|
|
else\
|
|
self.border.color = colors.lightGray\
|
|
self.txtcolor = colors.lightGray\
|
|
end\
|
|
self.render()\
|
|
end",
|
|
name = "packagenextclicky",
|
|
},
|
|
[ "install.lua" ] = {
|
|
id = 19,
|
|
content = "local win = window.create(term.current(),1,1,term.getSize())\
|
|
local function render()\
|
|
term.setBackgroundColor(colors.cyan)\
|
|
term.clear()\
|
|
local x = 2\
|
|
local w,h = term.getSize()\
|
|
if w < \
|
|
win.reposition(",
|
|
name = "install.lua",
|
|
},
|
|
[ "corclicky.lua" ] = {
|
|
id = 2,
|
|
content = "while true do\
|
|
local e = {os.pullEvent()}\
|
|
if e[1] == \"mouse_click\" and e[3] >= self.x1 and e[4] >= self.y1 and e[3] <= self.x2 and e[4] <= self.y2 then\
|
|
self.oldcolor = self.color\
|
|
self.color = self.border.color\
|
|
elseif e[1] == \"mouse_up\" and self.oldcolor then\
|
|
self.color = self.oldcolor\
|
|
self.oldcolor = nil\
|
|
end\
|
|
self.render()\
|
|
end",
|
|
name = "corclicky.lua",
|
|
},
|
|
[ "packagenext.lua" ] = {
|
|
id = 17,
|
|
content = "local slides = shapescape.getSlides()\
|
|
local s = shapescape.getSlide()\
|
|
if s.var.package and slides.cSlide < #slides then\
|
|
slides.package = s.var.package\
|
|
if s.var.package.name == \"Custom\" then\
|
|
shapescape.setSlide(slides.cSlide+1)\
|
|
else\
|
|
shapescape.setSlide(slides.cSlide+2)\
|
|
end\
|
|
end",
|
|
name = "packagenext.lua",
|
|
},
|
|
licensenextclicky = {
|
|
id = 9,
|
|
content = "local s = shapescape.getSlide()\
|
|
if not s.var then\
|
|
s.var = {}\
|
|
end\
|
|
while true do\
|
|
local e = {os.pullEvent()}\
|
|
if s.var.license then\
|
|
self.border.color = colors.blue\
|
|
self.txtcolor = colors.black\
|
|
if e[1] == \"mouse_click\" and e[3] >= self.x1 and e[4] >= self.y1 and e[3] <= self.x2 and e[4] <= self.y2 then\
|
|
self.oldcolor = self.color\
|
|
self.color = self.border.color\
|
|
elseif e[1] == \"mouse_up\" and self.oldcolor then\
|
|
self.color = self.oldcolor\
|
|
self.oldcolor = nil\
|
|
end\
|
|
else\
|
|
self.border.color = colors.lightGray\
|
|
self.txtcolor = colors.lightGray\
|
|
end\
|
|
self.render()\
|
|
end",
|
|
name = "licensenextclicky",
|
|
},
|
|
}
|
|
|
|
local nAssets = {}
|
|
for key,value in pairs(assets) do nAssets[key] = value nAssets[assets[key].id] = assets[key] end
|
|
assets = nAssets
|
|
nAssets = nil
|
|
|
|
local slides = {
|
|
{
|
|
w = 51,
|
|
h = 19,
|
|
x = 65,
|
|
y = 22,
|
|
objs = {
|
|
{
|
|
x1 = 1,
|
|
y1 = 1,
|
|
x2 = 51,
|
|
y2 = 19,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
color = 512,
|
|
ox2 = 0,
|
|
type = "rect",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
event = {
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
render = {
|
|
[ 2 ] = 1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
oy2 = 0,
|
|
},
|
|
{
|
|
x1 = 5,
|
|
y1 = 3,
|
|
x2 = 33,
|
|
y2 = 3,
|
|
txt = "Welcome!",
|
|
color = 512,
|
|
type = "text",
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 0,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
snap = {
|
|
Right = "Snap left",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap top",
|
|
},
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
txtcolor = 1,
|
|
},
|
|
{
|
|
x1 = 5,
|
|
y1 = 7,
|
|
x2 = 48,
|
|
y2 = 13,
|
|
ox2 = 3,
|
|
oy2 = 6,
|
|
type = "text",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
txt = "This is the installer of the LevelOS operating system. If you proceed, LevelOS and all of its components will be installed. Any existing OS on this device will be overwritten.",
|
|
txtcolor = 1,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
x1 = 39,
|
|
y1 = 16,
|
|
x2 = 48,
|
|
y2 = 18,
|
|
ox2 = 3,
|
|
oy1 = 3,
|
|
border = {
|
|
type = 1,
|
|
color = 2048,
|
|
},
|
|
ox1 = 12,
|
|
txtcolor = 32768,
|
|
oy2 = 1,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 2,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 3,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
type = "text",
|
|
txt = " Next",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
{
|
|
x1 = 27,
|
|
y1 = 16,
|
|
x2 = 36,
|
|
y2 = 18,
|
|
ox2 = 15,
|
|
oy1 = 3,
|
|
oy2 = 1,
|
|
ox1 = 24,
|
|
type = "text",
|
|
border = {
|
|
type = 1,
|
|
color = 256,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 2,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 5,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
txtcolor = 32768,
|
|
txt = " Exit",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
},
|
|
c = 1,
|
|
},
|
|
{
|
|
w = 51,
|
|
h = 19,
|
|
x = 65,
|
|
y = 22,
|
|
objs = {
|
|
{
|
|
type = "rect",
|
|
y1 = 1,
|
|
x2 = 51,
|
|
y2 = 19,
|
|
oy2 = 0,
|
|
x1 = 1,
|
|
ox2 = 0,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 512,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
type = "text",
|
|
y1 = 3,
|
|
x2 = 33,
|
|
y2 = 3,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 0,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
snap = {
|
|
Right = "Snap left",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap top",
|
|
},
|
|
txtcolor = 1,
|
|
x1 = 5,
|
|
color = 512,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
txt = "License",
|
|
},
|
|
{
|
|
x1 = 5,
|
|
y1 = 7,
|
|
x2 = 48,
|
|
y2 = 12,
|
|
border = {
|
|
type = 1,
|
|
color = 32768,
|
|
},
|
|
type = "window",
|
|
ox2 = 3,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 8,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 1,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
oy2 = 7,
|
|
},
|
|
{
|
|
x1 = 5,
|
|
y1 = 13,
|
|
x2 = 7,
|
|
y2 = 15,
|
|
type = "window",
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 6,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 7,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
border = {
|
|
type = 1,
|
|
color = 1,
|
|
},
|
|
snap = {
|
|
Right = "Snap left",
|
|
Left = "Snap left",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
oy1 = 6,
|
|
color = 512,
|
|
oy2 = 4,
|
|
},
|
|
{
|
|
x1 = 9,
|
|
y1 = 14,
|
|
x2 = 34,
|
|
y2 = 14,
|
|
oy1 = 5,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
txtcolor = 1,
|
|
snap = {
|
|
Right = "Snap left",
|
|
Left = "Snap left",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
txt = "I accept the license terms",
|
|
type = "text",
|
|
oy2 = 5,
|
|
color = 0,
|
|
input = false,
|
|
},
|
|
{
|
|
x1 = 39,
|
|
y1 = 16,
|
|
x2 = 48,
|
|
y2 = 18,
|
|
ox2 = 3,
|
|
oy1 = 3,
|
|
border = {
|
|
type = 1,
|
|
color = 2048,
|
|
},
|
|
ox1 = 12,
|
|
txtcolor = 32768,
|
|
oy2 = 1,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 9,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 10,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
type = "text",
|
|
txt = " Next",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
{
|
|
x1 = 27,
|
|
y1 = 16,
|
|
x2 = 36,
|
|
y2 = 18,
|
|
ox2 = 15,
|
|
oy1 = 3,
|
|
oy2 = 1,
|
|
ox1 = 24,
|
|
type = "text",
|
|
border = {
|
|
type = 1,
|
|
color = 256,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 2,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 5,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
txtcolor = 32768,
|
|
txt = " Back",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
},
|
|
c = 2,
|
|
},
|
|
{
|
|
w = 51,
|
|
h = 19,
|
|
x = 65,
|
|
y = 22,
|
|
objs = {
|
|
{
|
|
x1 = 1,
|
|
y1 = 1,
|
|
x2 = 51,
|
|
y2 = 19,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
type = "rect",
|
|
ox2 = 0,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 512,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
oy2 = 0,
|
|
},
|
|
{
|
|
x1 = 27,
|
|
y1 = 16,
|
|
x2 = 36,
|
|
y2 = 18,
|
|
ox2 = 15,
|
|
oy1 = 3,
|
|
oy2 = 1,
|
|
ox1 = 24,
|
|
type = "text",
|
|
border = {
|
|
type = 1,
|
|
color = 256,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 2,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 5,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
txtcolor = 32768,
|
|
txt = " Back",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
{
|
|
type = "rect",
|
|
y1 = 7,
|
|
x2 = 47,
|
|
y2 = 10,
|
|
x1 = 5,
|
|
ox2 = 4,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap top",
|
|
},
|
|
color = 1,
|
|
border = {
|
|
type = 1,
|
|
color = 512,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 13,
|
|
},
|
|
update = {
|
|
[ 2 ] = 11,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 12,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
type = "rect",
|
|
y1 = 11,
|
|
x2 = 47,
|
|
y2 = 14,
|
|
x1 = 5,
|
|
ox2 = 4,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap top",
|
|
},
|
|
color = 256,
|
|
border = {
|
|
type = 1,
|
|
color = 512,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 14,
|
|
},
|
|
update = {
|
|
[ 2 ] = 11,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
type = "text",
|
|
y1 = 3,
|
|
x2 = 20,
|
|
y2 = 3,
|
|
txtcolor = 1,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 0,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
x1 = 5,
|
|
txt = "Package",
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 7,
|
|
y1 = 8,
|
|
x2 = 18,
|
|
y2 = 8,
|
|
txt = "LevelOS Full",
|
|
type = "text",
|
|
txtcolor = 32768,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 7,
|
|
y1 = 9,
|
|
x2 = 46,
|
|
y2 = 9,
|
|
txt = "All components and programs included",
|
|
type = "text",
|
|
txtcolor = 256,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 7,
|
|
y1 = 12,
|
|
x2 = 27,
|
|
y2 = 12,
|
|
txt = "LevelOS Minimal",
|
|
type = "text",
|
|
txtcolor = 128,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 7,
|
|
y1 = 13,
|
|
x2 = 44,
|
|
y2 = 13,
|
|
txt = "Not supported at this time",
|
|
type = "text",
|
|
txtcolor = 128,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 39,
|
|
y1 = 16,
|
|
x2 = 48,
|
|
y2 = 18,
|
|
ox2 = 3,
|
|
oy1 = 3,
|
|
oy2 = 1,
|
|
ox1 = 12,
|
|
type = "text",
|
|
border = {
|
|
type = 1,
|
|
color = 2048,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 16,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 17,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
txtcolor = 32768,
|
|
txt = " Next",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
},
|
|
c = 3,
|
|
},
|
|
{
|
|
w = 51,
|
|
h = 19,
|
|
x = 65,
|
|
y = 22,
|
|
objs = {
|
|
{
|
|
type = "rect",
|
|
y1 = 1,
|
|
x2 = 51,
|
|
y2 = 19,
|
|
oy2 = 0,
|
|
x1 = 1,
|
|
ox2 = 0,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 512,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
type = "text",
|
|
y1 = 3,
|
|
x2 = 33,
|
|
y2 = 3,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 512,
|
|
txtcolor = 1,
|
|
x1 = 5,
|
|
snap = {
|
|
Right = "Snap left",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap top",
|
|
},
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
txt = "Select Packages",
|
|
},
|
|
{
|
|
x1 = 27,
|
|
y1 = 16,
|
|
x2 = 36,
|
|
y2 = 18,
|
|
ox2 = 15,
|
|
oy1 = 3,
|
|
border = {
|
|
type = 1,
|
|
color = 256,
|
|
},
|
|
ox1 = 24,
|
|
txtcolor = 32768,
|
|
oy2 = 1,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 2,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 5,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
type = "text",
|
|
txt = " Back",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
{
|
|
x1 = 39,
|
|
y1 = 16,
|
|
x2 = 48,
|
|
y2 = 18,
|
|
ox2 = 3,
|
|
oy1 = 3,
|
|
oy2 = 1,
|
|
ox1 = 12,
|
|
type = "text",
|
|
border = {
|
|
type = 1,
|
|
color = 2048,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 2,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 3,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
txtcolor = 32768,
|
|
txt = " Next",
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap right",
|
|
Top = "Snap bottom",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
input = false,
|
|
color = 1,
|
|
},
|
|
},
|
|
c = 4,
|
|
},
|
|
{
|
|
w = 51,
|
|
h = 19,
|
|
x = 65,
|
|
y = 22,
|
|
objs = {
|
|
{
|
|
type = "rect",
|
|
y1 = 1,
|
|
x2 = 51,
|
|
y2 = 19,
|
|
oy2 = 0,
|
|
x1 = 1,
|
|
ox2 = 0,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 512,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 1,
|
|
y1 = 1,
|
|
x2 = 51,
|
|
y2 = 19,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
type = "window",
|
|
ox2 = 0,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 20,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 32768,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap bottom",
|
|
},
|
|
oy2 = 0,
|
|
},
|
|
},
|
|
c = 5,
|
|
},
|
|
{
|
|
w = 51,
|
|
h = 19,
|
|
x = 65,
|
|
y = 22,
|
|
objs = {
|
|
{
|
|
x1 = 5,
|
|
y1 = 12,
|
|
x2 = 47,
|
|
y2 = 15,
|
|
type = "rect",
|
|
ox2 = 4,
|
|
snap = {
|
|
Right = "Snap right",
|
|
Left = "Snap left",
|
|
Top = "Snap top",
|
|
Bottom = "Snap top",
|
|
},
|
|
color = 1,
|
|
border = {
|
|
type = 1,
|
|
color = 512,
|
|
},
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = 15,
|
|
},
|
|
update = {
|
|
[ 2 ] = 11,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = 12,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
x1 = 7,
|
|
y1 = 14,
|
|
x2 = 43,
|
|
y2 = 14,
|
|
txt = "Select what components to install",
|
|
type = "text",
|
|
txtcolor = 256,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
{
|
|
x1 = 7,
|
|
y1 = 13,
|
|
x2 = 26,
|
|
y2 = 13,
|
|
txt = "LevelOS Custom",
|
|
type = "text",
|
|
txtcolor = 32768,
|
|
event = {
|
|
Coroutine = {
|
|
[ 2 ] = -1,
|
|
},
|
|
update = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_click = {
|
|
[ 2 ] = -1,
|
|
},
|
|
mouse_up = {
|
|
[ 2 ] = -1,
|
|
},
|
|
Initialize = {
|
|
[ 2 ] = -1,
|
|
},
|
|
selected = {
|
|
[ 2 ] = -1,
|
|
},
|
|
},
|
|
color = 0,
|
|
input = false,
|
|
border = {
|
|
type = 1,
|
|
color = 0,
|
|
},
|
|
},
|
|
},
|
|
c = 6,
|
|
},
|
|
}
|
|
|
|
for s=1,#slides do
|
|
local slide = slides[s]
|
|
for o=1,#slide.objs do
|
|
local obj = slide.objs[o]
|
|
for key,value in pairs(obj.event) do
|
|
if assets[ value[2] ] then
|
|
lUtils.shapescape.addScript(obj,value[2],key,assets,LevelOS,slides)
|
|
else
|
|
obj.event[key] = {function() end,-1}
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
local tArgs = {...}
|
|
if tArgs[1] and tArgs[1] == "load" then
|
|
return {assets=assets,slides=slides}
|
|
end
|
|
|
|
|
|
return lUtils.shapescape.run(slides,...)
|