Event cleanup

This commit is contained in:
kepler155c@gmail.com
2019-02-24 06:58:26 -05:00
parent 8ae3b33374
commit 687fc05445
3 changed files with 18 additions and 46 deletions

View File

@@ -62,10 +62,9 @@ function UI.StatusBar:getValue(name)
end
function UI.StatusBar:timedStatus(status, timeout)
timeout = timeout or 3
self:write(2, 1, Util.widthify(status, self.width-2), self.backgroundColor)
Event.addNamedTimer('statusTimer', timeout, false, function()
if self.parent.enabled then
Event.on(timeout or 3, function()
if self.enabled then
self:draw()
self:sync()
end