Update settings.lua
This commit is contained in:
parent
96eb0472b9
commit
23e3ac0d97
1 changed files with 4 additions and 1 deletions
|
@ -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!")
|
||||||
|
|
Loading…
Reference in a new issue