Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6b35cfd2f | |||
| 31d333333c | |||
| 3c7836c513 |
@@ -234,6 +234,7 @@ registerEventListener("modem_message", handleMessages)
|
|||||||
local GLFW_KEY_DOWN = 264
|
local GLFW_KEY_DOWN = 264
|
||||||
local GLFW_KEY_UP = 265
|
local GLFW_KEY_UP = 265
|
||||||
local GLFW_KEY_ENTER = 257
|
local GLFW_KEY_ENTER = 257
|
||||||
|
local GLFW_KEY_BACKSPACE = 259
|
||||||
|
|
||||||
local logOffset = 0
|
local logOffset = 0
|
||||||
|
|
||||||
@@ -269,6 +270,11 @@ function handleConsoleKeys(key)
|
|||||||
-- executeCommand(commandBuffer)
|
-- executeCommand(commandBuffer)
|
||||||
log.info("Executed command: %s", commandBuffer)
|
log.info("Executed command: %s", commandBuffer)
|
||||||
commandBuffer = ""
|
commandBuffer = ""
|
||||||
|
elseif key == GLFW_KEY_BACKSPACE then
|
||||||
|
local len = commandBuffer:len()
|
||||||
|
if len >= 1 then
|
||||||
|
commandBuffer = commandBuffer:sub(0, len - 1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -277,6 +283,7 @@ registerEventListener("key", handleConsoleKeys)
|
|||||||
--[[
|
--[[
|
||||||
drawing functions
|
drawing functions
|
||||||
]]
|
]]
|
||||||
|
-- to-do: dont apply offset based on log entries but on lines
|
||||||
function drawLogs(x0, y0, x1, y1)
|
function drawLogs(x0, y0, x1, y1)
|
||||||
local w = x1 - x0
|
local w = x1 - x0
|
||||||
local h = y1 - y0
|
local h = y1 - y0
|
||||||
|
|||||||
Reference in New Issue
Block a user