add a new function for setting status
This commit is contained in:
parent
8e915b20c8
commit
c7154880d9
7 changed files with 23 additions and 16 deletions
|
@ -0,0 +1,5 @@
|
|||
function setStatus(message)
|
||||
term.setCursorPos(2, 4)
|
||||
term.clearLine()
|
||||
term.write("STATUS: " .. message)
|
||||
end
|
|
@ -12,11 +12,14 @@ function main()
|
|||
|
||||
require("settingsFile")
|
||||
require("version")
|
||||
require("header")
|
||||
|
||||
readSettings()
|
||||
term.clear()
|
||||
drawTitle()
|
||||
|
||||
setStatus("IDLE")
|
||||
|
||||
if not fs.exists("/fosdata/.init") then
|
||||
writeSettings()
|
||||
options = newSystemOptions
|
||||
|
@ -85,12 +88,12 @@ end
|
|||
function deselect(index)
|
||||
term.setBackgroundColor(colors.black)
|
||||
term.setTextColor(colors.lime)
|
||||
term.setCursorPos(2, 4 + index)
|
||||
term.setCursorPos(2, 5 + index)
|
||||
term.write(options[index])
|
||||
end
|
||||
|
||||
function highlight(index)
|
||||
term.setCursorPos(2, 4 + index)
|
||||
term.setCursorPos(2, 5 + index)
|
||||
term.setBackgroundColor(colors.lime)
|
||||
term.setTextColor(colors.black)
|
||||
|
||||
|
@ -101,7 +104,7 @@ function highlight(index)
|
|||
end
|
||||
|
||||
function flicker(index)
|
||||
term.setCursorPos(2, 4 + index)
|
||||
term.setCursorPos(2, 5 + index)
|
||||
term.setBackgroundColor(colors.red)
|
||||
term.setTextColor(colors.black)
|
||||
|
||||
|
@ -114,8 +117,8 @@ function flicker(index)
|
|||
end
|
||||
|
||||
function drawMenuOptions()
|
||||
term.setCursorPos(2, 5)
|
||||
local line = 5
|
||||
term.setCursorPos(2, 6)
|
||||
local line = 6
|
||||
for i = 1, #options do
|
||||
local option = options[i]
|
||||
term.write(option)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
require "settingsFile"
|
||||
require "header"
|
||||
|
||||
readSettings()
|
||||
|
||||
|
@ -11,6 +12,4 @@ adminPin = read("*")
|
|||
|
||||
writeSettings()
|
||||
|
||||
term.setCursorPos(2,4)
|
||||
term.clearLine()
|
||||
term.write("ADMIN PIN UPDATED")
|
||||
setStatus("ADMIN PIN UPDATED")
|
|
@ -11,6 +11,4 @@ hostname = read()
|
|||
|
||||
writeSettings()
|
||||
|
||||
term.setCursorPos(2,4)
|
||||
term.clearLine()
|
||||
term.write("HOSTNAME UPDATED")
|
||||
setStatus("HOST NAME UPDATED")
|
|
@ -11,6 +11,4 @@ name = read()
|
|||
|
||||
writeSettings()
|
||||
|
||||
term.setCursorPos(2,4)
|
||||
term.clearLine()
|
||||
term.write("USER NAME UPDATED")
|
||||
setStatus("USER NAME UPDATED")
|
|
@ -1,4 +1,4 @@
|
|||
local myVersion = "1.0.032824.1301"
|
||||
local myVersion = "1.0.032824.1338"
|
||||
|
||||
function printVersion()
|
||||
term.setCursorPos(2,18)
|
||||
|
|
|
@ -22,10 +22,14 @@ shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/fa
|
|||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/updateWordList.lua")
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/version.lua")
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/mainMenu.lua")
|
||||
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/deps/settingsFile.lua")
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/deps/header.lua")
|
||||
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/setupCompleted.lua")
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/setHostname.lua")
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/setUser.lua")
|
||||
shell.run("wget https://git.zontreck.com/zontreck/FalloutOS/raw/branch/master/programs/setAdminPin.lua")
|
||||
|
||||
print("")
|
||||
print("ROBCO OS - UPDATING SOFTWARE UPDATER")
|
||||
|
|
Loading…
Reference in a new issue