From 8137ee6c1d60dfec3e2f3a58fd6da9416008321b Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Tue, 10 Nov 2015 19:14:27 +0100 Subject: [PATCH] Update settings.lua --- src/apps/system/settings.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/apps/system/settings.lua b/src/apps/system/settings.lua index be775ee..df8d89c 100644 --- a/src/apps/system/settings.lua +++ b/src/apps/system/settings.lua @@ -4,6 +4,8 @@ local pwChangeRep local menu = { "Update", "Change Password", + "Set Label", + "Clear Label", } local function clear() @@ -124,6 +126,20 @@ local function changePassword() return end +local function changeLabel() + header() + sertextext.center(3, "Set Label") + term.setCursorPos(2,5) + local newLabel = read() + os.setComputerLabel(newLabel) + sPhone.winOk("Computer Label set") +end + +local function clearLabel() + os.setComputerLabel(nil) + sPhone.winOk("Computer Label cleared") +end + local w, h = term.getSize() local function redraw()