style: format

This commit is contained in:
2025-05-08 13:03:35 -03:00
parent 0465b2de5b
commit 709b7fb992
+5 -4
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,7 +353,7 @@ end
function drawCommandBar(w, y) function drawCommandBar(w, y)
term.setCursorPos(1, y) term.setCursorPos(1, y)
term.setBackgroundColor(colors.white) term.setBackgroundColor(colors.white)
term.setTextColor(colors.gray) term.setTextColor(colors.gray)
@@ -361,7 +362,7 @@ function drawCommandBar(w, y)
term.write("$ ") term.write("$ ")
local startingIndex = commandBuffer:len() - w - 3 local startingIndex = commandBuffer:len() - w - 3
if startingIndex < 0 then if startingIndex < 0 then
startingIndex = 0 startingIndex = 0
end end