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 = "{\ files = "{\
[ \"home.lua\" ] = \"\\\ [ \"home.lua\" ] = \"local buttonsInHome = {\\\
\\\
local buttonsInHome = {\\\
{\\\"sphone.header\\\",23,1,25,1,sPhone.theme[\\\"header\\\"],sPhone.theme[\\\"headerText\\\"],\\\"vvv\\\"},\\\ {\\\"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.appList\\\",12,20,14,20,sPhone.theme[\\\"backgroundColor\\\"],sPhone.theme[\\\"header\\\"],\\\"===\\\"},\\\
{\\\"sphone.shell\\\",2,3,8,5,colors.black,colors.yellow,\\\" Shell\\\",2},\\\ {\\\"sphone.shell\\\",2,3,8,5,colors.black,colors.yellow,\\\" Shell\\\",2},\\\
@ -25,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()\\\
@ -46,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)\\\
@ -135,4 +125,4 @@
author = \"BeaconNet\",\ author = \"BeaconNet\",\
hidden = true,\ hidden = true,\
}", }",
} }

View file

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