@ -106,12 +106,7 @@ function UIManager:sendEvent(event)
end
end
-- this is the main loop of the UI controller
-- it is intended to manage input events and delegate
-- them to dialogs
function UIManager : run ( )
self._running = true
while self._running do
function UIManager : checkTasks ( )
local now = { util.gettime ( ) }
-- check if we have timed events in our queue and search next one
@ -141,6 +136,17 @@ function UIManager:run()
end
end
until all_tasks_checked
return wait_until
end
-- this is the main loop of the UI controller
-- it is intended to manage input events and delegate
-- them to dialogs
function UIManager : run ( )
self._running = true
while self._running do
local now = { util.gettime ( ) }
local wait_until = self : checkTasks ( )
--DEBUG("---------------------------------------------------")
--DEBUG("exec stack", self._execution_stack)
@ -176,6 +182,8 @@ function UIManager:run()
self.refresh_type = 1
end
self : checkTasks ( )
-- wait for next event
-- note that we will skip that if in the meantime we have tasks that are ready to run
local input_event = nil