Update settings.lua

This commit is contained in:
Ale32bit 2016-03-24 11:42:58 +01:00
parent 96eb0472b9
commit 23e3ac0d97

View file

@ -184,9 +184,12 @@ local function editTheme()
term.setCursorPos(2,5) term.setCursorPos(2,5)
local loadTheme = read() local loadTheme = read()
if fs.exists(loadTheme) and not fs.isDir(loadTheme) then if fs.exists(loadTheme) and not fs.isDir(loadTheme) then
for k, v in pairs(sPhone.theme) do for k, v in pairs(sPhone.theme) do -- Load theme
sPhone.theme[k] = config.read(loadTheme, k) sPhone.theme[k] = config.read(loadTheme, k)
end end
for k, v in pairs(sPhone.theme) do -- Overwrite theme config
config.write("/.sPhone/config/theme", k, v)
end
sPhone.winOk("Theme loaded!") sPhone.winOk("Theme loaded!")
else else
sPhone.winok("Theme not found!") sPhone.winok("Theme not found!")