1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-06 02:23:01 +00:00

minor bugfixes - cleanup

This commit is contained in:
kepler155c@gmail.com
2020-04-22 23:37:12 -06:00
parent 7224d441ca
commit b0d2ce0199
5 changed files with 20 additions and 27 deletions

View File

@@ -361,7 +361,8 @@ function Canvas:__renderLayers(device, offset, doubleBuffer)
y = region[2] - offset.y,
ex = region[3] - offset.x,
ey = region[4] - offset.y },
{ x = region[1], y = region[2] }, doubleBuffer)
{ x = region[1], y = region[2] },
doubleBuffer)
end
self.regions = nil

View File

@@ -12,6 +12,7 @@ UI.Checkbox.defaults = {
textColor = 'white',
backgroundColor = 'black',
backgroundFocusColor = 'lightGray',
event = 'checkbox_change',
height = 1,
width = 3,
accelerators = {
@@ -52,7 +53,7 @@ end
function UI.Checkbox:eventHandler(event)
if event.type == 'checkbox_toggle' then
self.value = not self.value
self:emit({ type = 'checkbox_change', checked = self.value, element = self })
self:emit({ type = self.event, checked = self.value, element = self })
self:draw()
return true
end

View File

@@ -77,9 +77,7 @@ function UI.TitleBar.example()
x = 2, y = 3,
text = 'Press',
},
focus = function (self)
self:raise()
end,
focus = UI.Window.raise,
},
draw = function(self, isBG)
for i = 1, self.height do