Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 709b7fb992 | |||
| 0465b2de5b | |||
| 7305789194 |
@@ -258,10 +258,10 @@ function drawConsole(y)
|
||||
|
||||
end
|
||||
|
||||
|
||||
function handleConsoleInput(char)
|
||||
commandBuffer = commandBuffer..char
|
||||
commandBuffer = commandBuffer .. char
|
||||
end
|
||||
|
||||
registerEventListener("char", handleConsoleInput)
|
||||
|
||||
function handleConsoleKeys(key)
|
||||
@@ -271,6 +271,7 @@ function handleConsoleKeys(key)
|
||||
commandBuffer = ""
|
||||
end
|
||||
end
|
||||
|
||||
registerEventListener("key", handleConsoleKeys)
|
||||
|
||||
--[[
|
||||
@@ -352,15 +353,16 @@ end
|
||||
|
||||
function drawCommandBar(w, y)
|
||||
term.setCursorPos(1, y)
|
||||
term.clearLine()
|
||||
|
||||
term.setBackgroundColor(colors.white)
|
||||
term.setTextColor(colors.black)
|
||||
term.setTextColor(colors.gray)
|
||||
|
||||
term.clearLine()
|
||||
|
||||
term.write("$ ")
|
||||
|
||||
local startingIndex = commandBuffer:len() - w - 3
|
||||
if startingIndex < 0 then
|
||||
if startingIndex < 0 then
|
||||
startingIndex = 0
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user