Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Dandarawy authored Feb 7, 2020
1 parent 6161b68 commit b55c853
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Window/WindowUILayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@ public override void HideScreen(IWindowController screen) {
AddTransition(screen);
screen.Hide();

CurrentWindow = null;

if (windowQueue.Count > 0) {
ShowNextInQueue();
}
else if (windowHistory.Count > 0) {
ShowPreviousInHistory();
}
Action<IUIScreenController> outTransitionFinishedHandler = null;
outTransitionFinishedHandler = (controller) => {
CurrentWindow = null;
if (windowQueue.Count > 0)
{
ShowNextInQueue();
}
else if (windowHistory.Count > 0)
{
ShowPreviousInHistory();
}
screen.OutTransitionFinished -= outTransitionFinishedHandler;
};
screen.OutTransitionFinished += outTransitionFinishedHandler;
}
else {
Debug.LogError(
Expand Down

0 comments on commit b55c853

Please sign in to comment.