can now use named colors

This commit is contained in:
kepler155c@gmail.com
2020-04-21 22:32:12 -06:00
parent e703c7f7b6
commit 5933f8c40f
42 changed files with 308 additions and 400 deletions

View File

@@ -58,14 +58,14 @@ local page = UI.Page {
},
[2] = UI.Tab {
tabTitle = 'Output',
backgroundColor = colors.black,
backgroundColor = 'black',
output = UI.Embedded {
y = 2,
maxScroll = 1000,
backgroundColor = colors.black,
backgroundColor = 'black',
},
draw = function(self)
self:write(1, 1, string.rep('\131', self.width), colors.black, UI.colors.primary)
self:write(1, 1, string.rep('\131', self.width), 'black', 'primary')
self:drawChildren()
end,
},
@@ -162,7 +162,7 @@ function page:eventHandler(event)
local sz = #value
local pos = self.prompt.entry.pos
self:setPrompt(autocomplete(sandboxEnv, value, self.prompt.entry.pos))
self.prompt:setPosition(pos + #value - sz)
self.prompt:setPosition(pos + #(self.prompt.value or '') - sz)
self.prompt:updateCursor()
elseif event.type == 'device' then
@@ -201,7 +201,6 @@ function page:eventHandler(event)
command = nil
self.grid:setValues(t)
self.grid:setIndex(1)
self.grid:adjustWidth()
self:draw()
end
return true
@@ -248,7 +247,6 @@ function page:setResult(result)
end
self.grid:setValues(t)
self.grid:setIndex(1)
self.grid:adjustWidth()
self:draw()
end