Skip to content
Snippets Groups Projects
Commit 3e46f0f0 authored by dos's avatar dos Committed by dos
Browse files

py,st3m: ViewManager: Don't impose additional delay after transition

Since 18f17883, a drawn frame is
guaranteed to reach the screen in a timely manner regardless of whether
the next think call will block for longer or not, so there's no need
to queue additional frames to make sure the animation has visibly
ended before dispatching _done callbacks anymore.
parent 5ed0fb9e
No related branches found
No related tags found
No related merge requests found
...@@ -212,7 +212,7 @@ class ViewManager(Responder): ...@@ -212,7 +212,7 @@ class ViewManager(Responder):
self._input = InputController() self._input = InputController()
self._first_think = False self._first_think = False
self._fully_drawn = 0 self._fully_drawn = False
self._outgoing_wants_to_think = False self._outgoing_wants_to_think = False
...@@ -235,7 +235,7 @@ class ViewManager(Responder): ...@@ -235,7 +235,7 @@ class ViewManager(Responder):
self._transitioning = True self._transitioning = True
self._transition = 0.0 self._transition = 0.0
self._first_think = True self._first_think = True
self._fully_drawn = 0 self._fully_drawn = False
self._direction = self._pending_direction self._direction = self._pending_direction
self._overriden_vt = self._pending_vt self._overriden_vt = self._pending_vt
self._outgoing = self._incoming self._outgoing = self._incoming
...@@ -258,7 +258,7 @@ class ViewManager(Responder): ...@@ -258,7 +258,7 @@ class ViewManager(Responder):
if self._transition >= 1.0: if self._transition >= 1.0:
self._transition = 1.0 self._transition = 1.0
if self._fully_drawn > 1: if self._fully_drawn:
self._end_transition() self._end_transition()
if self._input.buttons.os.middle.pressed: if self._input.buttons.os.middle.pressed:
...@@ -284,7 +284,7 @@ class ViewManager(Responder): ...@@ -284,7 +284,7 @@ class ViewManager(Responder):
return return
if self._transition >= 1.0: if self._transition >= 1.0:
self._fully_drawn += 1 self._fully_drawn = True
ctx.save() ctx.save()
self._incoming.draw(ctx) self._incoming.draw(ctx)
ctx.restore() ctx.restore()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment