mirror of
https://github.com/kepler155c/opus
synced 2025-10-16 16:27:39 +00:00
rename shell -> shell.lua
This commit is contained in:
@@ -25,8 +25,8 @@ function Terminal.window(parent, sx, sy, w, h, isVisible)
|
||||
width = w,
|
||||
height = h,
|
||||
isColor = parent.isColor(),
|
||||
offy = 0,
|
||||
})
|
||||
canvas.offy = 0
|
||||
|
||||
win.canvas = canvas
|
||||
|
||||
@@ -164,7 +164,7 @@ function Terminal.window(parent, sx, sy, w, h, isVisible)
|
||||
function win.redraw()
|
||||
if isVisible then
|
||||
canvas:dirty()
|
||||
canvas:render(parent)
|
||||
update()
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -198,10 +198,12 @@ function Canvas:blit(x, y, text, bg, fg)
|
||||
end
|
||||
|
||||
function Canvas:writeLine(y, text, fg, bg)
|
||||
self.lines[y].dirty = true
|
||||
self.lines[y].text = text
|
||||
self.lines[y].fg = fg
|
||||
self.lines[y].bg = bg
|
||||
if y > 0 and y <= #self.lines then
|
||||
self.lines[y].dirty = true
|
||||
self.lines[y].text = text
|
||||
self.lines[y].fg = fg
|
||||
self.lines[y].bg = bg
|
||||
end
|
||||
end
|
||||
|
||||
function Canvas:clearLine(y, bg, fg)
|
||||
|
@@ -15,20 +15,12 @@ UI.Checkbox.defaults = {
|
||||
backgroundColor = colors.black,
|
||||
backgroundFocusColor = colors.lightGray,
|
||||
height = 1,
|
||||
width = 3,
|
||||
accelerators = {
|
||||
space = 'checkbox_toggle',
|
||||
mouse_click = 'checkbox_toggle',
|
||||
}
|
||||
}
|
||||
function UI.Checkbox:setParent()
|
||||
if not self.width and not self.ex then
|
||||
self.width = (self.label and #self.label or 0) + 3
|
||||
else
|
||||
self.width = 3
|
||||
end
|
||||
UI.Window.setParent(self)
|
||||
end
|
||||
|
||||
function UI.Checkbox:draw()
|
||||
local bg = self.backgroundColor
|
||||
if self.focused then
|
||||
|
Reference in New Issue
Block a user