Add files via upload

This commit is contained in:
Ale32bit 2016-11-24 22:24:57 +01:00 committed by GitHub
parent 6fa265bb5c
commit ac27bc0425
2 changed files with 22 additions and 22 deletions

View file

@ -4,9 +4,7 @@
--
{
files = "{\
[ \"home.lua\" ] = \"\\\
\\\
local buttonsInHome = {\\\
[ \"home.lua\" ] = \"local buttonsInHome = {\\\
{\\\"sphone.header\\\",23,1,25,1,sPhone.theme[\\\"header\\\"],sPhone.theme[\\\"headerText\\\"],\\\"vvv\\\"},\\\
{\\\"sphone.appList\\\",12,20,14,20,sPhone.theme[\\\"backgroundColor\\\"],sPhone.theme[\\\"header\\\"],\\\"===\\\"},\\\
{\\\"sphone.shell\\\",2,3,8,5,colors.black,colors.yellow,\\\" Shell\\\",2},\\\
@ -25,15 +23,7 @@
end\\\
\\\
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()\\\
\\\
\\\
visum.buttons(buttonsInHome,true)\\\
\\\
local w, h = term.getSize()\\\
@ -46,7 +36,7 @@
function redraw()\\\
drawHome()\\\
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.setBackgroundColor(sPhone.theme[\\\"header\\\"])\\\
visum.align(\\\"right\\\",\\\"^^^ \\\",false,1)\\\
@ -135,4 +125,4 @@
author = \"BeaconNet\",\
hidden = true,\
}",
}
}

View file

@ -11,15 +11,20 @@ local w,h = term.getSize()\\\
local password\\\
\\\
local menu = {\\\
\\\"Update\\\",\\\
\\\"Edit Theme\\\",\\\
\\\"Change Username\\\",\\\
\\\"Change Password\\\",\\\
\\\"Set Label\\\",\\\
\\\"Clear Label\\\",\\\
\\\"Default Apps\\\",\\\
\\\"Update\\\", --1\\\
\\\"Edit Theme\\\", --2\\\
\\\"Change Username\\\", --3\\\
\\\"Change Password\\\", --4\\\
\\\"Set Label\\\", --5\\\
\\\"Clear Label\\\", --6\\\
\\\"Default Apps\\\", --7\\\
\\\"Hide Update\\\", --8\\\
}\\\
\\\
if not config.read(\\\"/.sPhone/config/sPhone\\\",\\\"showUpdate\\\") then\\\
menu[8] = \\\"Show Update\\\"\\\
end\\\
\\\
local function clear()\\\
term.setBackgroundColor(sPhone.theme[\\\"backgroundColor\\\"])\\\
term.setTextColor(sPhone.theme[\\\"text\\\"])\\\
@ -397,8 +402,11 @@ local function defaultApps()\\\
end\\\
\\\
while true do\\\
clear()\\\
sPhone.header(\\\"\\\",\\\"X\\\")\\\
if not config.read(\\\"/.sPhone/config/sPhone\\\",\\\"showUpdate\\\") then\\\
menu[8] = \\\"Show Update\\\"\\\
else\\\
menu[8] = \\\"Hide Update\\\"\\\
end\\\
local name, id = sPhone.menu(menu, \\\"Settings\\\",\\\"X\\\")\\\
if id == 0 then\\\
task.kill(temp.get(\\\"homePID\\\"))\\\
@ -417,6 +425,8 @@ while true do\\\
clearLabel()\\\
elseif id == 7 then\\\
defaultApps()\\\
elseif id == 8 then\\\
config.write(\\\"/.sPhone/config/sPhone\\\",\\\"showUpdate\\\", not config.read(\\\"/.sPhone/config/sPhone\\\",\\\"showUpdate\\\"))\\\
end\\\
end\\\
\",\