Try to avoid more update_regions_func mismatches

scheduling tricks
This commit is contained in:
NiLuJe
2014-11-14 15:07:14 +01:00
committed by Hans-Werner Hilse
parent f6753085ef
commit e9573ebe58
3 changed files with 31 additions and 25 deletions

View File

@@ -152,14 +152,14 @@ end
function Button:onTapSelectButton()
if self.enabled and self.callback then
self[1].invert = true
-- NOTE: Nope, this breaks the FM, by only refreshing the buttons themselves :D.
--[[
UIManager.update_regions_func = function()
return {self[1].dimen}
end
--]]
UIManager:setDirty(self.show_parent, "partial")
UIManager:scheduleIn(0.0, function()
self[1].invert = true
UIManager.update_regions_func = function()
return {self[1].dimen}
end
UIManager.repaint_all = true -- FIXME: Why?
UIManager:setDirty(self.show_parent, "partial")
end)
UIManager:scheduleIn(0.1, function()
self.callback()
self[1].invert = false