diff --git a/programs/deps/header.lua b/programs/deps/header.lua index e69de29..fca8588 100644 --- a/programs/deps/header.lua +++ b/programs/deps/header.lua @@ -0,0 +1,5 @@ +function setStatus(message) + term.setCursorPos(2, 4) + term.clearLine() + term.write("STATUS: " .. message) +end \ No newline at end of file diff --git a/programs/mainMenu.lua b/programs/mainMenu.lua index 74b1ea1..d33f4b8 100644 --- a/programs/mainMenu.lua +++ b/programs/mainMenu.lua @@ -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) diff --git a/programs/setAdminPin.lua b/programs/setAdminPin.lua index 6e3ec29..4172488 100644 --- a/programs/setAdminPin.lua +++ b/programs/setAdminPin.lua @@ -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") \ No newline at end of file +setStatus("ADMIN PIN UPDATED") \ No newline at end of file diff --git a/programs/setHostname.lua b/programs/setHostname.lua index 80e0219..25c2c34 100644 --- a/programs/setHostname.lua +++ b/programs/setHostname.lua @@ -5,12 +5,10 @@ readSettings() term.clear() drawTitle() term.setCursorPos(2, 6) -term.write("ENTER THE HOSTNAME> ") +term.write("ENTER THE HOST NAME> ") hostname = read() writeSettings() -term.setCursorPos(2,4) -term.clearLine() -term.write("HOSTNAME UPDATED") \ No newline at end of file +setStatus("HOST NAME UPDATED") \ No newline at end of file diff --git a/programs/setUser.lua b/programs/setUser.lua index a761d95..1647c37 100644 --- a/programs/setUser.lua +++ b/programs/setUser.lua @@ -11,6 +11,4 @@ name = read() writeSettings() -term.setCursorPos(2,4) -term.clearLine() -term.write("USER NAME UPDATED") \ No newline at end of file +setStatus("USER NAME UPDATED") \ No newline at end of file diff --git a/programs/version.lua b/programs/version.lua index fecd4ea..0f0b649 100644 --- a/programs/version.lua +++ b/programs/version.lua @@ -1,4 +1,4 @@ -local myVersion = "1.0.032824.1301" +local myVersion = "1.0.032824.1338" function printVersion() term.setCursorPos(2,18) diff --git a/update_falloutOS.lua b/update_falloutOS.lua index f376ab4..b5d7b59 100755 --- a/update_falloutOS.lua +++ b/update_falloutOS.lua @@ -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")