Compare commits

...

3 Commits

Author SHA1 Message Date
neru 709b7fb992 style: format 2025-05-08 13:03:35 -03:00
neru 0465b2de5b style: make cmd bar gray 2025-05-08 13:03:23 -03:00
neru 7305789194 fix: clearing before setting color 2025-05-08 13:03:16 -03:00
+5 -3
View File
@@ -258,10 +258,10 @@ function drawConsole(y)
end end
function handleConsoleInput(char) function handleConsoleInput(char)
commandBuffer = commandBuffer .. char commandBuffer = commandBuffer .. char
end end
registerEventListener("char", handleConsoleInput) registerEventListener("char", handleConsoleInput)
function handleConsoleKeys(key) function handleConsoleKeys(key)
@@ -271,6 +271,7 @@ function handleConsoleKeys(key)
commandBuffer = "" commandBuffer = ""
end end
end end
registerEventListener("key", handleConsoleKeys) registerEventListener("key", handleConsoleKeys)
--[[ --[[
@@ -352,10 +353,11 @@ end
function drawCommandBar(w, y) function drawCommandBar(w, y)
term.setCursorPos(1, y) term.setCursorPos(1, y)
term.clearLine()
term.setBackgroundColor(colors.white) term.setBackgroundColor(colors.white)
term.setTextColor(colors.black) term.setTextColor(colors.gray)
term.clearLine()
term.write("$ ") term.write("$ ")