Skip to content

Commit

Permalink
Fixed|UI|Client: Game UI should be behind busy transition
Browse files Browse the repository at this point in the history
If possible, keep the game UI behind the busy transition. Note that
when using the UI compositor for Oculus Rift, we must have the busy
transition in the root to cover the entire view, and this will let
the game UI to be drawn before the transition is finished.
  • Loading branch information
skyjake committed Dec 28, 2013
1 parent 47f54a5 commit 8d162c9
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions doomsday/client/src/ui/clientwindow.cpp
Expand Up @@ -174,17 +174,17 @@ DENG2_OBSERVES(App, StartupComplete)
game->disable();
root.add(game);

gameUI = new GameUIWidget;
gameUI->rule().setRect(root.viewRule());
gameUI->disable();
container().add(gameUI);

// Busy widget shows progress indicator and frozen game content.
busy = new BusyWidget;
busy->hide(); // normally hidden
busy->rule().setRect(root.viewRule());
root.add(busy);

gameUI = new GameUIWidget;
gameUI->rule().setRect(root.viewRule());
gameUI->disable();
container().add(gameUI);

// Game selection.
gameSelMenu = new GameSelectionWidget;
gameSelMenu->rule()
Expand Down Expand Up @@ -575,6 +575,13 @@ DENG2_OBSERVES(App, StartupComplete)
}

container().add(gameUI);

if(&container() == &root)
{
// Make sure the game UI doesn't show up over the busy transition.
container().moveChildBefore(gameUI, *busy);
}

container().add(gameSelMenu);
if(sidebar) container().add(sidebar);
container().add(notifications);
Expand Down

0 comments on commit 8d162c9

Please sign in to comment.