Update home.spk
This commit is contained in:
parent
8d43c6c434
commit
08e460821d
1 changed files with 21 additions and 42 deletions
|
@ -4,28 +4,15 @@
|
||||||
--
|
--
|
||||||
{
|
{
|
||||||
files = "{\
|
files = "{\
|
||||||
[ \"home.lua\" ] = \"\\\
|
[ \"home.lua\" ] = \"local buttonsInHome = {\\\
|
||||||
\\\
|
{\\\"sphone.header\\\",23,1,25,1,sPhone.theme[\\\"header\\\"],sPhone.theme[\\\"headerText\\\"],\\\"vvv\\\"},\\\
|
||||||
local buttonsInHome = {\\\
|
{\\\"sphone.appList\\\",12,20,14,20,sPhone.theme[\\\"backgroundColor\\\"],sPhone.theme[\\\"header\\\"],\\\"===\\\"},\\\
|
||||||
{\\\"sPhone.header\\\",23,1,25,1,sPhone.theme[\\\"header\\\"],sPhone.theme[\\\"headerText\\\"],\\\"vvv\\\"},\\\
|
{\\\"sphone.shell\\\",2,3,8,5,colors.black,colors.yellow,\\\" Shell\\\",2},\\\
|
||||||
{\\\"sPhone.appsButton\\\",12,20,14,20,sPhone.theme[\\\"backgroundColor\\\"],sPhone.theme[\\\"header\\\"],\\\"===\\\"},\\\
|
{\\\"sphone.explorer\\\",11,3,17,5,colors.blue,colors.white,\\\" Files\\\",2},\\\
|
||||||
{\\\"sPhone.shell\\\",2,3,8,5,colors.black,colors.yellow,\\\" Shell\\\",2},\\\
|
{\\\"sphone.lock\\\",20,3,25,5,colors.lightGray,colors.black,\\\" Lock\\\",2},\\\
|
||||||
{\\\"sPhone.lock\\\",19,3,24,5,colors.lightGray,colors.black,\\\" Lock\\\",2},\\\
|
{\\\"sphone.gps\\\",11,7,15,9,colors.red,colors.black,\\\" GPS\\\",2},\\\
|
||||||
{\\\"sPhone.chat\\\",11,3,16,5,colors.black,colors.white,\\\" Chat\\\",2},\\\
|
{\\\"sphone.info\\\",18,7,23,9,colors.lightGray,colors.black,\\\" Info\\\",2},\\\
|
||||||
{\\\"sPhone.gps\\\",11,7,15,9,colors.red,colors.black,\\\" GPS\\\",2},\\\
|
{\\\"sphone.store\\\",2,7,8,9,colors.green,colors.white,\\\" Store\\\",2},\\\
|
||||||
{\\\"sPhone.info\\\",18,7,23,9,colors.lightGray,colors.black,\\\" Info\\\",2},\\\
|
|
||||||
{\\\"sPhone.store\\\",2,7,8,9,colors.green,colors.white,\\\" Store\\\",2},\\\
|
|
||||||
}\\\
|
|
||||||
\\\
|
|
||||||
\\\
|
|
||||||
local appsOnHome = {\\\
|
|
||||||
[\\\"sPhone.shell\\\"] = \\\"/.sPhone/apps/shell\\\",\\\
|
|
||||||
[\\\"sPhone.chat\\\"] = \\\"/.sPhone/apps/chat\\\",\\\
|
|
||||||
[\\\"sPhone.gps\\\"] = \\\"/.sPhone/apps/gps\\\",\\\
|
|
||||||
[\\\"sPhone.info\\\"] = \\\"/.sPhone/apps/system/info\\\",\\\
|
|
||||||
[\\\"sPhone.store\\\"] = \\\"/.sPhone/apps/store\\\",\\\
|
|
||||||
[\\\"sPhone.appsButton\\\"] = \\\"/.sPhone/apps/appList\\\",\\\
|
|
||||||
\\\
|
|
||||||
}\\\
|
}\\\
|
||||||
\\\
|
\\\
|
||||||
local function clear()\\\
|
local function clear()\\\
|
||||||
|
@ -36,15 +23,7 @@
|
||||||
end\\\
|
end\\\
|
||||||
\\\
|
\\\
|
||||||
local function drawHome()\\\
|
local function drawHome()\\\
|
||||||
local function box(x,y,text,bg,colorText,page)\\\
|
|
||||||
graphics.box(x,y,x+1+#text,y+2,bg)\\\
|
|
||||||
term.setCursorPos(x+1,y+1)\\\
|
|
||||||
term.setTextColor(colorText)\\\
|
|
||||||
write(text)\\\
|
|
||||||
end\\\
|
|
||||||
clear()\\\
|
clear()\\\
|
||||||
\\\
|
|
||||||
\\\
|
|
||||||
visum.buttons(buttonsInHome,true)\\\
|
visum.buttons(buttonsInHome,true)\\\
|
||||||
\\\
|
\\\
|
||||||
local w, h = term.getSize()\\\
|
local w, h = term.getSize()\\\
|
||||||
|
@ -57,7 +36,7 @@
|
||||||
function redraw()\\\
|
function redraw()\\\
|
||||||
drawHome()\\\
|
drawHome()\\\
|
||||||
local w, h = term.getSize()\\\
|
local w, h = term.getSize()\\\
|
||||||
graphics.box(1,2,w,4,sPhone.theme[\\\"header\\\"])\\\
|
paintutils.drawFilledBox(1,2,w,4,sPhone.theme[\\\"header\\\"])\\\
|
||||||
term.setTextColor(sPhone.theme[\\\"headerText\\\"])\\\
|
term.setTextColor(sPhone.theme[\\\"headerText\\\"])\\\
|
||||||
term.setBackgroundColor(sPhone.theme[\\\"header\\\"])\\\
|
term.setBackgroundColor(sPhone.theme[\\\"header\\\"])\\\
|
||||||
visum.align(\\\"right\\\",\\\"^^^ \\\",false,1)\\\
|
visum.align(\\\"right\\\",\\\"^^^ \\\",false,1)\\\
|
||||||
|
@ -81,7 +60,7 @@
|
||||||
sPhone.inHome = true\\\
|
sPhone.inHome = true\\\
|
||||||
elseif x > 10 and x < 19 then\\\
|
elseif x > 10 and x < 19 then\\\
|
||||||
sPhone.inHome = false\\\
|
sPhone.inHome = false\\\
|
||||||
shell.run(\\\"/.sPhone/apps/system/settings\\\")\\\
|
sPhone.launch(\\\"sphone.settings\\\")\\\
|
||||||
sPhone.inHome = true\\\
|
sPhone.inHome = true\\\
|
||||||
drawHome()\\\
|
drawHome()\\\
|
||||||
end\\\
|
end\\\
|
||||||
|
@ -100,16 +79,16 @@
|
||||||
local autoLockTimer = os.startTimer(10)\\\
|
local autoLockTimer = os.startTimer(10)\\\
|
||||||
local id = visum.buttons(buttonsInHome)\\\
|
local id = visum.buttons(buttonsInHome)\\\
|
||||||
\\\
|
\\\
|
||||||
if id == \\\"sPhone.header\\\" then\\\
|
if id == \\\"sphone.header\\\" then\\\
|
||||||
footerMenu()\\\
|
footerMenu()\\\
|
||||||
elseif id == \\\"sPhone.lock\\\" then\\\
|
elseif id == \\\"sphone.lock\\\" then\\\
|
||||||
sPhone.inHome = false\\\
|
sPhone.inHome = false\\\
|
||||||
sPhone.login()\\\
|
sPhone.login()\\\
|
||||||
sPhone.inHome = true\\\
|
sPhone.inHome = true\\\
|
||||||
elseif appsOnHome[id] then\\\
|
else\\\
|
||||||
sPhone.inHome = false\\\
|
sPhone.inHome = false\\\
|
||||||
os.pullEvent = os.oldPullEvent\\\
|
os.pullEvent = os.oldPullEvent\\\
|
||||||
shell.run(appsOnHome[id])\\\
|
sPhone.launch(id)\\\
|
||||||
os.pullEvent = os.pullEventRaw\\\
|
os.pullEvent = os.pullEventRaw\\\
|
||||||
sPhone.inHome = true\\\
|
sPhone.inHome = true\\\
|
||||||
end\\\
|
end\\\
|
||||||
|
@ -138,12 +117,12 @@
|
||||||
\",\
|
\",\
|
||||||
}",
|
}",
|
||||||
config = "{\
|
config = "{\
|
||||||
main = \"home.lua\",\
|
|
||||||
id = \"sphone.home\",\
|
|
||||||
name = \"sPhone Home\",\
|
|
||||||
hidden = true,\
|
|
||||||
author = \"BeaconNet\",\
|
|
||||||
version = 1,\
|
|
||||||
type = \"home\",\
|
type = \"home\",\
|
||||||
|
main = \"home.lua\",\
|
||||||
|
name = \"sPhone Home\",\
|
||||||
|
version = 1,\
|
||||||
|
id = \"sphone.home\",\
|
||||||
|
author = \"BeaconNet\",\
|
||||||
|
hidden = true,\
|
||||||
}",
|
}",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue