diff options
| author | Alee <Alee14498@gmail.com> | 2019-03-05 10:07:23 -0500 |
|---|---|---|
| committer | Alee <Alee14498@gmail.com> | 2019-03-05 10:07:23 -0500 |
| commit | a0b298a29fe83ab93dfb9bb4dab3bbd1c574d932 (patch) | |
| tree | e87defbfd32e705d79e770dbd54f44d78bd5a455 /system/desktop.lua | |
| parent | 76182cd576ededfc364b16d6b5b57f791a122bb7 (diff) | |
| download | bits-UI-a0b298a29fe83ab93dfb9bb4dab3bbd1c574d932.tar.gz bits-UI-a0b298a29fe83ab93dfb9bb4dab3bbd1c574d932.tar.bz2 bits-UI-a0b298a29fe83ab93dfb9bb4dab3bbd1c574d932.zip | |
Added the desktop and move the boot up sequence to it's own file
Diffstat (limited to 'system/desktop.lua')
| -rw-r--r-- | system/desktop.lua | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/system/desktop.lua b/system/desktop.lua index 1e4a40d..83abc6f 100644 --- a/system/desktop.lua +++ b/system/desktop.lua @@ -1,5 +1,27 @@ -os.pullEvent = os.pullEventRaw -term.clear() -term.setCursorPos(1,1) -term.setBackgroundColor(colors.white) -print("Welcome to the desktop where nothing happens... Yet!")
\ No newline at end of file +-- bits-UI: An operating system for ComputerCraft. Licensed with GPL-3.0. + +function titleBar() + local time = os.time() + local formattedTime = textutils.formatTime(time, false) + term.setCursorPos(1,1) + term.setBackgroundColor(colors.green) + term.setTextColor(1) + term.clearLine() + term.setCursorPos(2, 1) + print("[Apps]") + term.setCursorPos(44, 1) + print(formattedTime) + end + +function drawDesktop() + term.setBackgroundColor(colors.black) + term.clear() + titleBar() +end + +drawDesktop() + +while true do +local event, button, X, Y = os.pullEventRaw() +drawDesktop() +end
\ No newline at end of file |
